diff options
Diffstat (limited to 'btimed.c')
-rw-r--r-- | btimed.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -26,6 +26,7 @@ main(int argc, char **argv) struct sockaddr_in cli_addr; int cli_addr_len; ssize_t nbytes; + unsigned int local_btime; openlog("btimed", LOG_PID, LOG_USER); @@ -37,8 +38,10 @@ main(int argc, char **argv) /* Generate the standard btime message */ memset(outmsg, 0, BTIME_MSGLEN); - sprintf(outmsg, "%u\n", get_btime()); + local_btime = get_btime(); + sprintf(outmsg, "%u\n", local_btime); + syslog(LOG_INFO, "started with btime = %u", local_btime); for (;;) { memset(&cli_addr, 0, sizeof cli_addr); cli_addr_len = sizeof cli_addr; @@ -49,6 +52,7 @@ main(int argc, char **argv) /* Bail, we may have had an alarm(), or other error. * client side resends request, no need to retry here. */ + syslog(LOG_INFO, "exitting"); exit(0); } |