aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Barksdale <amatus.amongus@gmail.com>2015-01-05 04:35:56 +0000
committerDavid Barksdale <amatus.amongus@gmail.com>2015-01-05 04:35:56 +0000
commit4b46e4a593dfe2738d087f3cb18535053af773b5 (patch)
treef9b9486edc37836de103409733ef2c27ae513eee /src
parent168354abecc858a90c4db8363db78593b0c24a7b (diff)
downloadgnunet-4b46e4a593dfe2738d087f3cb18535053af773b5.tar.gz
gnunet-4b46e4a593dfe2738d087f3cb18535053af773b5.zip
Check return value of GNUNET_STATISTICS_get
Or we could always call the callback with GNUNET_SYSERR.
Diffstat (limited to 'src')
-rw-r--r--src/datastore/gnunet-service-datastore.c2
-rw-r--r--src/hostlist/gnunet-daemon-hostlist_client.c6
-rw-r--r--src/sensor/gnunet-service-sensor_monitoring.c2
3 files changed, 10 insertions, 0 deletions
diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c
index 71d436999..6c493768d 100644
--- a/src/datastore/gnunet-service-datastore.c
+++ b/src/datastore/gnunet-service-datastore.c
@@ -1661,6 +1661,8 @@ run (void *cls,
1661 &process_stat_done, 1661 &process_stat_done,
1662 &process_stat_in, 1662 &process_stat_in,
1663 NULL); 1663 NULL);
1664 if (NULL == stat_get)
1665 process_stat_done (NULL, GNUNET_SYSERR);
1664 GNUNET_SERVER_disconnect_notify (server, 1666 GNUNET_SERVER_disconnect_notify (server,
1665 &cleanup_reservations, 1667 &cleanup_reservations,
1666 NULL); 1668 NULL);
diff --git a/src/hostlist/gnunet-daemon-hostlist_client.c b/src/hostlist/gnunet-daemon-hostlist_client.c
index 0751668b3..cd6984b1a 100644
--- a/src/hostlist/gnunet-daemon-hostlist_client.c
+++ b/src/hostlist/gnunet-daemon-hostlist_client.c
@@ -1657,6 +1657,12 @@ GNUNET_HOSTLIST_client_start (const struct GNUNET_CONFIGURATION_Handle *c,
1657 &primary_task, 1657 &primary_task,
1658 &process_stat, 1658 &process_stat,
1659 NULL); 1659 NULL);
1660 if (NULL == sget)
1661 {
1662 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1663 "Statistics request failed, scheduling hostlist download\n");
1664 ti_check_download = GNUNET_SCHEDULER_add_now (&task_check, NULL);
1665 }
1660 return GNUNET_OK; 1666 return GNUNET_OK;
1661} 1667}
1662 1668
diff --git a/src/sensor/gnunet-service-sensor_monitoring.c b/src/sensor/gnunet-service-sensor_monitoring.c
index f473c3a75..08c0bd62a 100644
--- a/src/sensor/gnunet-service-sensor_monitoring.c
+++ b/src/sensor/gnunet-service-sensor_monitoring.c
@@ -335,6 +335,8 @@ sensor_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
335 &end_sensor_run_stat, 335 &end_sensor_run_stat,
336 &sensor_statistics_iterator, 336 &sensor_statistics_iterator,
337 sensorinfo); 337 sensorinfo);
338 if (NULL == sensorinfo->gnunet_stat_get_handle)
339 sensorinfo->running = GNUNET_NO;
338 } 340 }
339 else if (0 == strcmp ("process", sensorinfo->source)) 341 else if (0 == strcmp ("process", sensorinfo->source))
340 { 342 {