aboutsummaryrefslogtreecommitdiff
path: root/src/statistics
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-04-18 13:49:05 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-04-18 13:49:05 +0000
commitb8156b15d817bb2ae518777b749a231e9d7cc1a3 (patch)
tree945debbb20c0e6f1ffabfa6c0b53c78d8bf4b37f /src/statistics
parent151053e6aea2c91059843885748bbd10ff183e9b (diff)
downloadgnunet-b8156b15d817bb2ae518777b749a231e9d7cc1a3.tar.gz
gnunet-b8156b15d817bb2ae518777b749a231e9d7cc1a3.zip
fix 2273
Diffstat (limited to 'src/statistics')
-rw-r--r--src/statistics/statistics_api.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c
index c0b978f70..253e59737 100644
--- a/src/statistics/statistics_api.c
+++ b/src/statistics/statistics_api.c
@@ -281,6 +281,8 @@ schedule_watch_request (struct GNUNET_STATISTICS_Handle *h,
281 size_t nsize; 281 size_t nsize;
282 282
283 GNUNET_assert (h != NULL); 283 GNUNET_assert (h != NULL);
284 GNUNET_assert (watch != NULL);
285
284 slen = strlen (watch->subsystem) + 1; 286 slen = strlen (watch->subsystem) + 1;
285 nlen = strlen (watch->name) + 1; 287 nlen = strlen (watch->name) + 1;
286 nsize = sizeof (struct GNUNET_MessageHeader) + slen + nlen; 288 nsize = sizeof (struct GNUNET_MessageHeader) + slen + nlen;
@@ -382,7 +384,10 @@ try_connect (struct GNUNET_STATISTICS_Handle *h)
382 } 384 }
383 } 385 }
384 for (i = 0; i < h->watches_size; i++) 386 for (i = 0; i < h->watches_size; i++)
385 schedule_watch_request (h, h->watches[i]); 387 {
388 if (NULL != h->watches[i])
389 schedule_watch_request (h, h->watches[i]);
390 }
386 return GNUNET_YES; 391 return GNUNET_YES;
387 } 392 }
388 LOG (GNUNET_ERROR_TYPE_DEBUG, 393 LOG (GNUNET_ERROR_TYPE_DEBUG,