aboutsummaryrefslogtreecommitdiff
path: root/src/statistics
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-06-17 21:56:21 +0000
committerChristian Grothoff <christian@grothoff.org>2010-06-17 21:56:21 +0000
commit5bb4b33bf7cc18112ce1770e0012096e7bb9426b (patch)
tree5c941ed913af03aef6b13018555a05a04ea4f94e /src/statistics
parentbed39036b47e1b820ee40d645f743e18520c4f8c (diff)
downloadgnunet-5bb4b33bf7cc18112ce1770e0012096e7bb9426b.tar.gz
gnunet-5bb4b33bf7cc18112ce1770e0012096e7bb9426b.zip
fixes
Diffstat (limited to 'src/statistics')
-rw-r--r--src/statistics/statistics_api.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c
index 4ba459c46..3289745b1 100644
--- a/src/statistics/statistics_api.c
+++ b/src/statistics/statistics_api.c
@@ -196,7 +196,7 @@ static int
196try_connect (struct GNUNET_STATISTICS_Handle *ret) 196try_connect (struct GNUNET_STATISTICS_Handle *ret)
197{ 197{
198 if (ret->client != NULL) 198 if (ret->client != NULL)
199 return GNUNET_OK; 199 return GNUNET_YES;
200 ret->client = GNUNET_CLIENT_connect (ret->sched, "statistics", ret->cfg); 200 ret->client = GNUNET_CLIENT_connect (ret->sched, "statistics", ret->cfg);
201 if (ret->client != NULL) 201 if (ret->client != NULL)
202 return GNUNET_YES; 202 return GNUNET_YES;
@@ -235,9 +235,12 @@ finish (struct GNUNET_STATISTICS_Handle *h, int code)
235 struct GNUNET_STATISTICS_GetHandle *pos = h->current; 235 struct GNUNET_STATISTICS_GetHandle *pos = h->current;
236 h->current = NULL; 236 h->current = NULL;
237 schedule_action (h); 237 schedule_action (h);
238 if (pos->cont != NULL) 238 if (pos != NULL)
239 pos->cont (pos->cls, code); 239 {
240 free_action_item (pos); 240 if (pos->cont != NULL)
241 pos->cont (pos->cls, code);
242 free_action_item (pos);
243 }
241} 244}
242 245
243 246