diff options
author | 2019-03-29 14:01:49 +0200 | |
---|---|---|
committer | 2019-03-29 14:45:44 +0200 | |
commit | de18684a25cdc1e310636c5f74d4e901881b5710 (patch) | |
tree | ecafbe8964adef080f9889a6d79790ffa11cb6cb /src/daemon/net.c | |
parent | 05a93fcf7f541e2e969820efa35375190fdc3ce6 (diff) | |
download | usurpation-de18684a25cdc1e310636c5f74d4e901881b5710.tar.gz usurpation-de18684a25cdc1e310636c5f74d4e901881b5710.tar.bz2 usurpation-de18684a25cdc1e310636c5f74d4e901881b5710.zip |
daemon: style adjustment
Fix style inconsistencies and move port settings to settings.c.
Part of Ticket 3.
Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
Diffstat (limited to 'src/daemon/net.c')
-rw-r--r-- | src/daemon/net.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/daemon/net.c b/src/daemon/net.c index 2969d9b..27375e3 100644 --- a/src/daemon/net.c +++ b/src/daemon/net.c @@ -185,18 +185,18 @@ static void *dolisten(void * state) } else { st->status = A_OK; } - - if (oldstatus != st->status) - { - oldstatus = st->status; - if(st->status == DEAD) - /* this timestamp is arbitraty */ - fprintf(stderr, "Connection with the client has been lost. Last reply since: %li \n", st->lastreply.tv_sec); - else{ - ipstring = inet_ntoa(clientaddr.sin_addr); - fprintf(stderr, "Successful incoming connection from %s\n", ipstring); - } - } + + if (oldstatus != st->status) + { + oldstatus = st->status; + if(st->status == DEAD) { + /* this timestamp is arbitraty */ + fprintf(stderr, "Connection with the client has been lost. Last reply since: %li \n", st->lastreply.tv_sec); + } else { + ipstring = inet_ntoa(clientaddr.sin_addr); + fprintf(stderr, "Successful incoming connection from %s\n", ipstring); + } + } pthread_mutex_unlock(&st->datamutex); pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &cancelstate); pthread_testcancel(); |