X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=keydctl.c;h=ef942dbd92d78635d1b31b5f6a78ccd021fc7ddf;hb=5e40e676a7c4f640c9f850a379300c01a5fca69c;hp=4ffecae2943a3fa2bcb51ba08a4889aa0c8208dc;hpb=c04c1c60469823c01268187ec49102d1ff540806;p=onak.git diff --git a/keydctl.c b/keydctl.c index 4ffecae..ef942db 100644 --- a/keydctl.c +++ b/keydctl.c @@ -32,7 +32,7 @@ #include "version.h" /* HACK: We need to stop onak-conf.o requiring this. */ -void *DBFUNCS = NULL; +void *DBINIT = NULL; static int keyd_fd = -1; static int verbose = 0; @@ -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);