while(1)
{
/* sock must be set. */
- if(logr->sock == -1)
+ if(agt->sock == -1)
{
sleep(5);
continue;
}
FD_ZERO(&fdset);
- FD_SET(logr->sock, &fdset);
+ FD_SET(agt->sock, &fdset);
/* Wait for 30 seconds. */
selecttime.tv_usec = 0;
- /* Wait for 120 seconds at a maximum for any descriptor */
+ /* Wait with a timeout for any descriptor */
recv_b = select(0, &fdset, NULL, NULL, &selecttime);
if(recv_b == -1)
{
}
/* Read until no more messages are available */
- while((recv_b = recv(logr->sock,buffer,OS_SIZE_1024, 0))>0)
+ while((recv_b = recv(agt->sock,buffer,OS_SIZE_1024, 0))>0)
{
/* Id of zero -- only one key allowed */
tmp_msg = ReadSecMSG(&keys, buffer, cleartext, 0, recv_b -1);
if(tmp_msg == NULL)
{
- merror(MSG_ERROR,ARGV0,logr->rip[logr->rip_id]);
+ merror(MSG_ERROR,ARGV0,agt->rip[agt->rip_id]);
continue;
}
/* Run timeout commands. */
- if(logr->execdq >= 0)
+ if(agt->execdq >= 0)
WinTimeoutRun(available_server);
/* If it is an active response message */
/* Run on windows. */
- if(logr->execdq >= 0)
+ if(agt->execdq >= 0)
{
WinExecdRun(tmp_msg);
}