X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=keydctl.c;h=ef942dbd92d78635d1b31b5f6a78ccd021fc7ddf;hb=83ae316a7b14e55418349e87d1a1942a0627ae14;hp=47492c59e26c887474cf125b6024cea1a3de2bf5;hpb=8e0907be1d73011075a99a0c029c56664e12843e;p=onak.git diff --git a/keydctl.c b/keydctl.c index 47492c5..ef942db 100644 --- a/keydctl.c +++ b/keydctl.c @@ -154,10 +154,17 @@ static void keyd_status(void) uint32_t reply; struct keyd_stats stats; - keyd_do_command(KEYD_CMD_VERSION, &reply, sizeof(reply)); + if (keyd_do_command(KEYD_CMD_VERSION, &reply, sizeof(reply)) == -1) { + printf("Got failure asking for keyd version.\n"); + return; + } printf("Using keyd protocol version %d.\n", reply); - keyd_do_command(KEYD_CMD_STATS, &stats, sizeof(stats)); + if (keyd_do_command(KEYD_CMD_STATS, &stats, sizeof(stats)) == -1) { + printf("Got failure asking for keyd statistics.\n"); + return; + } + printf("keyd running since %s", ctime(&stats.started)); printf("%d client connections received\n", stats.connects);