int fd = sock->sock;
SilcBuffer src = sock->outbuf;
+ if (SILC_IS_DISABLED(sock))
+ return -1;
+
SILC_LOG_DEBUG(("Writing data to socket %d", fd));
if (src->len > 0) {
SILC_LOG_DEBUG(("Could not write immediately, will do it later"));
return -2;
}
- SILC_LOG_ERROR(("Cannot write to socket: %s", strerror(errno)));
+ SILC_LOG_DEBUG(("Cannot write to socket: %s", strerror(errno)));
return -1;
}
unsigned char buf[SILC_SOCKET_READ_SIZE];
int fd = sock->sock;
+ if (SILC_IS_DISABLED(sock))
+ return -1;
+
SILC_LOG_DEBUG(("Reading data from socket %d", fd));
/* Read the data from the socket. */
SILC_LOG_DEBUG(("Could not read immediately, will do it later"));
return -2;
}
- SILC_LOG_ERROR(("Cannot read from socket: %d:%s", fd, strerror(errno)));
+ SILC_LOG_DEBUG(("Cannot read from socket: %d:%s", fd, strerror(errno)));
return -1;
}