summaryrefslogtreecommitdiffstats
path: root/src/daemon/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/net.c')
-rw-r--r--src/daemon/net.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/daemon/net.c b/src/daemon/net.c
index 29f1fde..62172fe 100644
--- a/src/daemon/net.c
+++ b/src/daemon/net.c
@@ -165,7 +165,7 @@ int net_send(int nd, const char * const buf, size_t buf_size)
ssize_t sent;
struct timespec now;
- if (nd > count || nd < 1 || state[--nd].available) {
+ if (nd > count || nd < 1 || state[--nd].available || state[nd].status != A_OK) {
ret = ERROR;
} else {
if (setting_verbose() >= INFO) {
@@ -250,10 +250,10 @@ static void *dolisten(void * state)
if (oldstatus != st->status)
{
oldstatus = st->status;
- if(st->status == DEAD) {
+ if (st->status == DEAD) {
/* this timestamp is arbitraty */
setting_verbose() >= INFO ? fprintf(stderr, "Connection with the client has been lost. Last reply since: %li \n", st->lastreply.tv_sec) : 0;
- } else {
+ } else if (st->status == A_OK) {
ipstring = inet_ntoa(st->clientaddr.sin_addr);
setting_verbose() >= INFO ? fprintf(stderr, "Successful incoming connection from %s\n", ipstring) : 0;
}