aboutsummaryrefslogtreecommitdiff
path: root/src/nse
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2013-05-08 14:26:24 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2013-05-08 14:26:24 +0000
commitd572acdffc00a8e70912558d99af608a00dc8cdd (patch)
treeabd46c4e74eed450e3ae6f13f416589974de4cc8 /src/nse
parent7bf3ac6b107974065f4c91774626506f1e9459a3 (diff)
downloadgnunet-d572acdffc00a8e70912558d99af608a00dc8cdd.tar.gz
gnunet-d572acdffc00a8e70912558d99af608a00dc8cdd.zip
- flush logger data before disconnecting
Diffstat (limited to 'src/nse')
-rw-r--r--src/nse/gnunet-service-nse.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c
index 536d36a35..433274372 100644
--- a/src/nse/gnunet-service-nse.c
+++ b/src/nse/gnunet-service-nse.c
@@ -1266,6 +1266,23 @@ handle_core_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
1266} 1266}
1267 1267
1268 1268
1269#if ENABLE_NSE_HISTOGRAM
1270/**
1271 * Functions of this type are called to notify a successful transmission of the
1272 * message to the logger service
1273 *
1274 * @param cls NULL
1275 * @param size the amount of data sent
1276 */
1277static void
1278flush_comp_cb (void *cls, size_t size)
1279{
1280 GNUNET_TESTBED_LOGGER_disconnect (lh);
1281 lh = NULL;
1282}
1283#endif
1284
1285
1269/** 1286/**
1270 * Task run during shutdown. 1287 * Task run during shutdown.
1271 * 1288 *
@@ -1317,8 +1334,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
1317 my_private_key = NULL; 1334 my_private_key = NULL;
1318 } 1335 }
1319#if ENABLE_NSE_HISTOGRAM 1336#if ENABLE_NSE_HISTOGRAM
1320 GNUNET_TESTBED_LOGGER_disconnect (lh); 1337 GNUNET_TESTBED_LOGGER_flush (lh, &flush_comp_cb, NULL); /* actual shutdown delayed */
1321 lh = NULL;
1322#endif 1338#endif
1323} 1339}
1324 1340