aboutsummaryrefslogtreecommitdiff
path: root/src/peerstore/peerstore_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/peerstore/peerstore_api.c')
-rw-r--r--src/peerstore/peerstore_api.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/peerstore/peerstore_api.c b/src/peerstore/peerstore_api.c
index 502b38646..d0c72acf1 100644
--- a/src/peerstore/peerstore_api.c
+++ b/src/peerstore/peerstore_api.c
@@ -323,11 +323,14 @@ store_request_sent (void *cls)
323 GNUNET_PEERSTORE_Continuation cont; 323 GNUNET_PEERSTORE_Continuation cont;
324 void *cont_cls; 324 void *cont_cls;
325 325
326 cont = sc->cont; 326 if (NULL != sc)
327 cont_cls = sc->cont_cls; 327 {
328 GNUNET_PEERSTORE_store_cancel (sc); 328 cont = sc->cont;
329 if (NULL != cont) 329 cont_cls = sc->cont_cls;
330 cont (cont_cls, GNUNET_OK); 330 GNUNET_PEERSTORE_store_cancel (sc);
331 if (NULL != cont)
332 cont (cont_cls, GNUNET_OK);
333 }
331} 334}
332 335
333 336
@@ -492,11 +495,17 @@ GNUNET_PEERSTORE_store_cancel (struct GNUNET_PEERSTORE_StoreContext *sc)
492{ 495{
493 struct GNUNET_PEERSTORE_Handle *h = sc->h; 496 struct GNUNET_PEERSTORE_Handle *h = sc->h;
494 497
498 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
499 "store cancel with sc %p \n",
500 sc);
495 GNUNET_CONTAINER_DLL_remove (sc->h->store_head, sc->h->store_tail, sc); 501 GNUNET_CONTAINER_DLL_remove (sc->h->store_head, sc->h->store_tail, sc);
496 GNUNET_free (sc->sub_system); 502 GNUNET_free (sc->sub_system);
497 GNUNET_free (sc->value); 503 GNUNET_free (sc->value);
498 GNUNET_free (sc->key); 504 GNUNET_free (sc->key);
499 GNUNET_free (sc); 505 GNUNET_free (sc);
506 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
507 "store cancel with sc %p is null\n",
508 sc);
500 if ((GNUNET_YES == h->disconnecting) && (NULL == h->store_head)) 509 if ((GNUNET_YES == h->disconnecting) && (NULL == h->store_head))
501 final_disconnect (h); 510 final_disconnect (h);
502} 511}