aboutsummaryrefslogtreecommitdiff
path: root/src/statistics
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-12-21 16:23:14 +0000
committerChristian Grothoff <christian@grothoff.org>2010-12-21 16:23:14 +0000
commit3051850f341a640d5cbbd8c9d66c7030e0d7328e (patch)
tree279f47b526a8c1adc8f33c4de2535d5c87b4ce37 /src/statistics
parent2685a36c06c65970155ab21dc4891c9721a3c92a (diff)
downloadgnunet-3051850f341a640d5cbbd8c9d66c7030e0d7328e.tar.gz
gnunet-3051850f341a640d5cbbd8c9d66c7030e0d7328e.zip
fail on fatal connect error
Diffstat (limited to 'src/statistics')
-rw-r--r--src/statistics/statistics_api.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c
index b697d33f1..d44bc77d1 100644
--- a/src/statistics/statistics_api.c
+++ b/src/statistics/statistics_api.c
@@ -766,6 +766,7 @@ GNUNET_STATISTICS_destroy (struct GNUNET_STATISTICS_Handle *h,
766 struct GNUNET_TIME_Relative timeout; 766 struct GNUNET_TIME_Relative timeout;
767 int i; 767 int i;
768 768
769 if (h == NULL) return;
769 if (GNUNET_SCHEDULER_NO_TASK != h->backoff_task) 770 if (GNUNET_SCHEDULER_NO_TASK != h->backoff_task)
770 GNUNET_SCHEDULER_cancel (h->backoff_task); 771 GNUNET_SCHEDULER_cancel (h->backoff_task);
771 if (sync_first) 772 if (sync_first)
@@ -918,6 +919,7 @@ schedule_action (struct GNUNET_STATISTICS_Handle *h)
918 } 919 }
919} 920}
920 921
922
921/** 923/**
922 * Get statistic from the peer. 924 * Get statistic from the peer.
923 * 925 *
@@ -1025,6 +1027,8 @@ GNUNET_STATISTICS_watch (struct GNUNET_STATISTICS_Handle *handle,
1025{ 1027{
1026 struct GNUNET_STATISTICS_WatchEntry *w; 1028 struct GNUNET_STATISTICS_WatchEntry *w;
1027 1029
1030 if (handle == NULL)
1031 return GNUNET_SYSERR;
1028 w = GNUNET_malloc (sizeof (struct GNUNET_STATISTICS_WatchEntry)); 1032 w = GNUNET_malloc (sizeof (struct GNUNET_STATISTICS_WatchEntry));
1029 w->subsystem = GNUNET_strdup (subsystem); 1033 w->subsystem = GNUNET_strdup (subsystem);
1030 w->name = GNUNET_strdup (name); 1034 w->name = GNUNET_strdup (name);