commit 4b46e4a593dfe2738d087f3cb18535053af773b5
parent 168354abecc858a90c4db8363db78593b0c24a7b
Author: David Barksdale <amatus.amongus@gmail.com>
Date: Mon, 5 Jan 2015 04:35:56 +0000
Check return value of GNUNET_STATISTICS_get
Or we could always call the callback with GNUNET_SYSERR.
Diffstat:
3 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c
@@ -1661,6 +1661,8 @@ run (void *cls,
&process_stat_done,
&process_stat_in,
NULL);
+ if (NULL == stat_get)
+ process_stat_done (NULL, GNUNET_SYSERR);
GNUNET_SERVER_disconnect_notify (server,
&cleanup_reservations,
NULL);
diff --git 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,
&primary_task,
&process_stat,
NULL);
+ if (NULL == sget)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Statistics request failed, scheduling hostlist download\n");
+ ti_check_download = GNUNET_SCHEDULER_add_now (&task_check, NULL);
+ }
return GNUNET_OK;
}
diff --git 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)
&end_sensor_run_stat,
&sensor_statistics_iterator,
sensorinfo);
+ if (NULL == sensorinfo->gnunet_stat_get_handle)
+ sensorinfo->running = GNUNET_NO;
}
else if (0 == strcmp ("process", sensorinfo->source))
{