aboutsummaryrefslogtreecommitdiff
path: root/src/testbed
diff options
context:
space:
mode:
Diffstat (limited to 'src/testbed')
-rw-r--r--src/testbed/gnunet-service-testbed_hc.c9
-rw-r--r--src/testbed/gnunet-service-testbed_oc.c3
2 files changed, 7 insertions, 5 deletions
diff --git a/src/testbed/gnunet-service-testbed_hc.c b/src/testbed/gnunet-service-testbed_hc.c
index 6a75bbc794..575032e560 100644
--- a/src/testbed/gnunet-service-testbed_hc.c
+++ b/src/testbed/gnunet-service-testbed_hc.c
@@ -399,6 +399,11 @@ call_cgh_cb (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
GNUNET_CONTAINER_DLL_insert_tail (entry->cgh_qhead, entry->cgh_qtail, cgh);
if (NULL != cgh2)
entry->notify_task = GNUNET_SCHEDULER_add_now (&call_cgh_cb, entry);
+ if (NULL != cgh->nctxt)
+ {/* Register the peer connect notify callback */
+ GNUNET_CONTAINER_DLL_insert_tail (entry->nctxt_qhead, entry->nctxt_qtail,
+ cgh->nctxt);
+ }
LOG_DEBUG ("Calling notify for handle type %u\n", cgh->type);
cgh->cb (cgh->cb_cls, entry->core_handle,
entry->transport_handle_, entry->peer_identity);
@@ -658,7 +663,6 @@ cache_get_handle (unsigned int peer_id,
GNUNET_assert (NULL == cgh->nctxt);
cgh->nctxt = ctxt;
ctxt->cgh = cgh;
- GNUNET_CONTAINER_DLL_insert_tail (entry->nctxt_qhead, entry->nctxt_qtail, ctxt);
}
if (NULL != handle)
{
@@ -780,7 +784,8 @@ GST_cache_get_handle_done (struct GSTCacheGetHandle *cgh)
if (NULL != cgh->nctxt)
{
GNUNET_assert (cgh == cgh->nctxt->cgh);
- GNUNET_CONTAINER_DLL_remove (entry->nctxt_qhead, entry->nctxt_qtail, cgh->nctxt);
+ if (GNUNET_YES == cgh->notify_called)
+ GNUNET_CONTAINER_DLL_remove (entry->nctxt_qhead, entry->nctxt_qtail, cgh->nctxt);
GNUNET_free (cgh->nctxt);
}
GNUNET_free (cgh);
diff --git a/src/testbed/gnunet-service-testbed_oc.c b/src/testbed/gnunet-service-testbed_oc.c
index ddc31e5e28..b7650e932c 100644
--- a/src/testbed/gnunet-service-testbed_oc.c
+++ b/src/testbed/gnunet-service-testbed_oc.c
@@ -546,9 +546,6 @@ overlay_connect_notify (void *cls,
GNUNET_SCHEDULER_cancel (occ->tcc.task);
occ->tcc.task = GNUNET_SCHEDULER_NO_TASK;
}
- GST_cache_get_handle_done (occ->cgh_ch);
- occ->peer->reference_cnt--;
- occ->cgh_ch = NULL;
GNUNET_free_non_null (occ->emsg);
occ->emsg = NULL;
send_overlay_connect_success_msg (occ);