From f0ced9f1da47d7cb9a8df6c1761da118e3ee3a99 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 7 May 2012 07:59:00 +0000 Subject: [PATCH] -check return value --- src/statistics/gnunet-statistics.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/statistics/gnunet-statistics.c b/src/statistics/gnunet-statistics.c index 85d8b8c4d..c28514144 100644 --- a/src/statistics/gnunet-statistics.c +++ b/src/statistics/gnunet-statistics.c @@ -184,7 +184,12 @@ run (void *cls, char *const *args, const char *cfgfile, ret = 1; return; } - GNUNET_STATISTICS_watch(h, subsystem, name, &printer, h); + if (GNUNET_OK != GNUNET_STATISTICS_watch (h, subsystem, name, &printer, h)) + { + fprintf (stderr, _("Failed to initialize watch routine\n")); + GNUNET_SCHEDULER_add_now (&shutdown_task, h); + return; + } GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_UNIT_FOREVER_REL, &shutdown_task, h); } } -- 2.25.1