diff options
author | grothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96> | 2012-05-07 07:59:00 +0000 |
---|---|---|
committer | grothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96> | 2012-05-07 07:59:00 +0000 |
commit | bda75dd2c86d12f32d50877b9deed4f5e4563b65 (patch) | |
tree | 01578ff761df0cc432b711a8caa2f5e25ca5a04d /src/statistics | |
parent | aba8c434477a6e2070dab30bb0e88c99e1af71f4 (diff) |
-check return value
git-svn-id: https://gnunet.org/svn/gnunet@21314 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/statistics')
-rw-r--r-- | src/statistics/gnunet-statistics.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/statistics/gnunet-statistics.c b/src/statistics/gnunet-statistics.c index 85d8b8c4da..c285141444 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); } } |