if (status < 0)
{
DBG ("recv(2) failed: %s", strerror (errno));
+ DBG ("Closing socket #%i", sd);
+ close (sd);
+ sock_descr = sd = -1;
return (-1);
}
status = swrite (sd, (const char *) &req, REQ_LEN_NOMAC);
if (status < 0)
+ {
+ DBG ("`swrite' failed. Closing socket #%i", sd);
+ close (sd);
+ sock_descr = sd = -1;
return (status);
+ }
return (0);
}