[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r24954 - gnunet/src/testbed
From: |
gnunet |
Subject: |
[GNUnet-SVN] r24954 - gnunet/src/testbed |
Date: |
Wed, 14 Nov 2012 14:57:58 +0100 |
Author: harsha
Date: 2012-11-14 14:57:58 +0100 (Wed, 14 Nov 2012)
New Revision: 24954
Modified:
gnunet/src/testbed/gnunet-service-testbed.c
Log:
-fix slave crashes
Modified: gnunet/src/testbed/gnunet-service-testbed.c
===================================================================
--- gnunet/src/testbed/gnunet-service-testbed.c 2012-11-14 13:41:21 UTC (rev
24953)
+++ gnunet/src/testbed/gnunet-service-testbed.c 2012-11-14 13:57:58 UTC (rev
24954)
@@ -668,6 +668,11 @@
* The transport handle of peer B
*/
struct GNUNET_TRANSPORT_Handle *th;
+
+ /**
+ * The peer handle of peer B
+ */
+ struct Peer *peer;
/**
* Peer A's HELLO
@@ -2902,9 +2907,9 @@
if (NULL != occ->p2th)
{
GNUNET_TRANSPORT_disconnect (occ->p2th);
+ occ->p2th = NULL;
peer_list[occ->other_peer_id]->reference_cnt--;
}
- occ->p2th = NULL;
LOG_DEBUG ("Peers connected - Sending overlay connect success\n");
msg = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_ConnectionEventMessage));
msg->header.size =
@@ -3553,15 +3558,20 @@
static void
cleanup_rocc (struct RequestOverlayConnectContext *rocc)
{
+ LOG_DEBUG ("Cleaning up rocc\n");
if (GNUNET_SCHEDULER_NO_TASK != rocc->attempt_connect_task_id)
GNUNET_SCHEDULER_cancel (rocc->attempt_connect_task_id);
if (GNUNET_SCHEDULER_NO_TASK != rocc->timeout_rocc_task_id)
GNUNET_SCHEDULER_cancel (rocc->timeout_rocc_task_id);
- GNUNET_TRANSPORT_disconnect (rocc->th);
if (NULL != rocc->tch)
GNUNET_TRANSPORT_try_connect_cancel (rocc->tch);
if (NULL != rocc->ohh)
GNUNET_TRANSPORT_offer_hello_cancel (rocc->ohh);
+ GNUNET_TRANSPORT_disconnect (rocc->th);
+ rocc->peer->reference_cnt--;
+ if ((GNUNET_YES == rocc->peer->destroy_flag)
+ && (0 == rocc->peer->reference_cnt))
+ destroy_peer (rocc->peer);
GNUNET_free_non_null (rocc->hello);
GNUNET_CONTAINER_DLL_remove (roccq_head, roccq_tail, rocc);
GNUNET_free (rocc);
@@ -3752,7 +3762,9 @@
}
rocc = GNUNET_malloc (sizeof (struct RequestOverlayConnectContext));
GNUNET_CONTAINER_DLL_insert_tail (roccq_head, roccq_tail, rocc);
- rocc->th = GNUNET_TRANSPORT_connect (peer->details.local.cfg, NULL, rocc,
+ rocc->peer = peer;
+ rocc->peer->reference_cnt++;
+ rocc->th = GNUNET_TRANSPORT_connect (rocc->peer->details.local.cfg, NULL,
rocc,
NULL, &transport_connect_notify, NULL);
if (NULL == rocc->th)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r24954 - gnunet/src/testbed,
gnunet <=