}
catch (ModuleException& modexcept)
{
- log(DEBUG,"Module exception cought: %s",modexcept.GetReason()); \
+ log(DEBUG,"Module exception caught: %s",modexcept.GetReason());
}
if (MOD_RESULT < 0)
/*
* XXX - potential replacement for the below using my beloved pointers. --w00t
+ * XXX - no garauntee there's not \0's in the middle of the data,
+ * and no reason for it to be terminated either. -- Om
*
* for (char *c = data; data && *data; data++)
* {
for (std::vector<InspSocket*>::iterator a = module_sockets.begin(); a < module_sockets.end(); a++)
{
InspSocket* s = (InspSocket*)*a;
- if (s->Timeout(TIME))
+ if ((s) && (s->GetFd() >= 0) && (s->GetFd() < MAX_DESCRIPTORS) && (socket_ref[s->GetFd()] != NULL) && (s->Timeout(TIME)))
{
- log(DEBUG,"Socket poll returned false, close and bail");
- SE->DelFd(s->GetFd());
+ log(DEBUG,"userprocess.cpp: Socket poll returned false, close and bail");
socket_ref[s->GetFd()] = NULL;
- s->Close();
+ SE->DelFd(s->GetFd());
module_sockets.erase(a);
+ s->Close();
delete s;
break;
}
log(DEFAULT,"Total loaded modules: %lu",(unsigned long)MODCOUNT+1);
}
-
-