diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2013-03-04 14:24:49 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2013-03-04 14:24:49 +0000 |
commit | d0cf573115d89775e1546996c2e6780cac12a98c (patch) | |
tree | c1971daa508ae9a4d8cd8f7e70e81e6516b571c5 | |
parent | d0d1948a8d8519e46562737decdfaa6862dc89f5 (diff) | |
download | gnunet-d0cf573115d89775e1546996c2e6780cac12a98c.tar.gz gnunet-d0cf573115d89775e1546996c2e6780cac12a98c.zip |
- fix
11 files changed, 32 insertions, 21 deletions
diff --git a/src/testbed/gnunet-service-testbed_cache.c b/src/testbed/gnunet-service-testbed_cache.c index 83023f353..e75ded9b2 100644 --- a/src/testbed/gnunet-service-testbed_cache.c +++ b/src/testbed/gnunet-service-testbed_cache.c | |||
@@ -169,12 +169,12 @@ struct CacheEntry | |||
169 | /** | 169 | /** |
170 | * The transport handle to the peer corresponding to this entry; can be NULL | 170 | * The transport handle to the peer corresponding to this entry; can be NULL |
171 | */ | 171 | */ |
172 | struct GNUNET_TRANSPORT_Handle *transport_handle_; | 172 | struct GNUNET_TRANSPORT_Handle *transport_handle; |
173 | 173 | ||
174 | /** | 174 | /** |
175 | * The operation handle for transport handle | 175 | * The operation handle for transport handle |
176 | */ | 176 | */ |
177 | struct GNUNET_TESTBED_Operation *transport_op_; | 177 | struct GNUNET_TESTBED_Operation *transport_op; |
178 | 178 | ||
179 | /** | 179 | /** |
180 | * The core handle to the peer corresponding to this entry; can be NULL | 180 | * The core handle to the peer corresponding to this entry; can be NULL |
@@ -346,11 +346,12 @@ close_handles (struct CacheEntry *entry) | |||
346 | GNUNET_free (ctxt); | 346 | GNUNET_free (ctxt); |
347 | } | 347 | } |
348 | LOG_DEBUG ("Cleaning up handles from an entry in cache\n"); | 348 | LOG_DEBUG ("Cleaning up handles from an entry in cache\n"); |
349 | if (NULL != entry->transport_handle_) | 349 | if (NULL != entry->transport_handle) |
350 | GNUNET_assert (NULL != entry->transport_op); | ||
351 | if (NULL != entry->transport_op) | ||
350 | { | 352 | { |
351 | GNUNET_assert (NULL != entry->transport_op_); | 353 | GNUNET_TESTBED_operation_done (entry->transport_op); |
352 | GNUNET_TESTBED_operation_done (entry->transport_op_); | 354 | entry->transport_op = NULL; |
353 | entry->transport_op_ = NULL; | ||
354 | } | 355 | } |
355 | if (NULL != entry->core_op) | 356 | if (NULL != entry->core_op) |
356 | { | 357 | { |
@@ -431,7 +432,7 @@ search_suitable_cgh (const struct CacheEntry *entry, | |||
431 | switch (cgh->type) | 432 | switch (cgh->type) |
432 | { | 433 | { |
433 | case CGT_TRANSPORT_HANDLE: | 434 | case CGT_TRANSPORT_HANDLE: |
434 | if (NULL == entry->transport_handle_) | 435 | if (NULL == entry->transport_handle) |
435 | continue; | 436 | continue; |
436 | break; | 437 | break; |
437 | case CGT_CORE_HANDLE: | 438 | case CGT_CORE_HANDLE: |
@@ -477,7 +478,7 @@ call_cgh_cb (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
477 | cgh->nctxt); | 478 | cgh->nctxt); |
478 | } | 479 | } |
479 | LOG_DEBUG ("Calling notify for handle type %u\n", cgh->type); | 480 | LOG_DEBUG ("Calling notify for handle type %u\n", cgh->type); |
480 | cgh->cb (cgh->cb_cls, entry->core_handle, entry->transport_handle_, | 481 | cgh->cb (cgh->cb_cls, entry->core_handle, entry->transport_handle, |
481 | entry->peer_identity); | 482 | entry->peer_identity); |
482 | } | 483 | } |
483 | 484 | ||
@@ -562,10 +563,10 @@ opstart_get_handle_transport (void *cls) | |||
562 | 563 | ||
563 | GNUNET_assert (NULL != entry); | 564 | GNUNET_assert (NULL != entry); |
564 | LOG_DEBUG ("Opening a transport connection to peer %u\n", entry->peer_id); | 565 | LOG_DEBUG ("Opening a transport connection to peer %u\n", entry->peer_id); |
565 | entry->transport_handle_ = | 566 | entry->transport_handle = |
566 | GNUNET_TRANSPORT_connect (entry->cfg, NULL, entry, NULL, | 567 | GNUNET_TRANSPORT_connect (entry->cfg, NULL, entry, NULL, |
567 | &transport_peer_connect_notify_cb, NULL); | 568 | &transport_peer_connect_notify_cb, NULL); |
568 | if (NULL == entry->transport_handle_) | 569 | if (NULL == entry->transport_handle) |
569 | { | 570 | { |
570 | GNUNET_break (0); | 571 | GNUNET_break (0); |
571 | return; | 572 | return; |
@@ -590,10 +591,10 @@ oprelease_get_handle_transport (void *cls) | |||
590 | { | 591 | { |
591 | struct CacheEntry *entry = cls; | 592 | struct CacheEntry *entry = cls; |
592 | 593 | ||
593 | if (NULL == entry->transport_handle_) | 594 | if (NULL == entry->transport_handle) |
594 | return; | 595 | return; |
595 | GNUNET_TRANSPORT_disconnect (entry->transport_handle_); | 596 | GNUNET_TRANSPORT_disconnect (entry->transport_handle); |
596 | entry->transport_handle_ = NULL; | 597 | entry->transport_handle = NULL; |
597 | } | 598 | } |
598 | 599 | ||
599 | 600 | ||
@@ -746,7 +747,7 @@ cache_get_handle (unsigned int peer_id, struct GSTCacheGetHandle *cgh, | |||
746 | switch (cgh->type) | 747 | switch (cgh->type) |
747 | { | 748 | { |
748 | case CGT_TRANSPORT_HANDLE: | 749 | case CGT_TRANSPORT_HANDLE: |
749 | handle = entry->transport_handle_; | 750 | handle = entry->transport_handle; |
750 | if (NULL != handle) | 751 | if (NULL != handle) |
751 | LOG_DEBUG ("Found TRANSPORT handle in cache for peer %u\n", | 752 | LOG_DEBUG ("Found TRANSPORT handle in cache for peer %u\n", |
752 | entry->peer_id); | 753 | entry->peer_id); |
@@ -784,11 +785,11 @@ cache_get_handle (unsigned int peer_id, struct GSTCacheGetHandle *cgh, | |||
784 | switch (cgh->type) | 785 | switch (cgh->type) |
785 | { | 786 | { |
786 | case CGT_TRANSPORT_HANDLE: | 787 | case CGT_TRANSPORT_HANDLE: |
787 | if (NULL != entry->transport_op_) | 788 | if (NULL != entry->transport_op) |
788 | return cgh; | 789 | return cgh; |
789 | op = GNUNET_TESTBED_operation_create_ (entry, &opstart_get_handle_transport, | 790 | op = GNUNET_TESTBED_operation_create_ (entry, &opstart_get_handle_transport, |
790 | &oprelease_get_handle_transport); | 791 | &oprelease_get_handle_transport); |
791 | entry->transport_op_ = op; | 792 | entry->transport_op = op; |
792 | break; | 793 | break; |
793 | case CGT_CORE_HANDLE: | 794 | case CGT_CORE_HANDLE: |
794 | if (NULL != entry->core_op) | 795 | if (NULL != entry->core_op) |
@@ -827,11 +828,11 @@ cache_clear_iterator (void *cls, const struct GNUNET_HashCode *key, void *value) | |||
827 | close_handles (entry); | 828 | close_handles (entry); |
828 | GNUNET_free_non_null (entry->hello); | 829 | GNUNET_free_non_null (entry->hello); |
829 | GNUNET_break (GNUNET_SCHEDULER_NO_TASK == entry->expire_task); | 830 | GNUNET_break (GNUNET_SCHEDULER_NO_TASK == entry->expire_task); |
830 | GNUNET_break (NULL == entry->transport_handle_); | 831 | GNUNET_assert (NULL == entry->transport_handle); |
831 | GNUNET_break (NULL == entry->transport_op_); | 832 | GNUNET_assert (NULL == entry->transport_op); |
832 | GNUNET_break (NULL == entry->core_handle); | 833 | GNUNET_assert (NULL == entry->core_handle); |
833 | GNUNET_break (NULL == entry->core_op); | 834 | GNUNET_assert (NULL == entry->core_op); |
834 | GNUNET_break (NULL == entry->cfg); | 835 | GNUNET_assert (NULL == entry->cfg); |
835 | GNUNET_assert (NULL == entry->cgh_qhead); | 836 | GNUNET_assert (NULL == entry->cgh_qhead); |
836 | GNUNET_assert (NULL == entry->cgh_qtail); | 837 | GNUNET_assert (NULL == entry->cgh_qtail); |
837 | GNUNET_assert (NULL == entry->nctxt_qhead); | 838 | GNUNET_assert (NULL == entry->nctxt_qhead); |
diff --git a/src/testbed/test_testbed_api.conf b/src/testbed/test_testbed_api.conf index 52e0c9b8a..4af65d54f 100644 --- a/src/testbed/test_testbed_api.conf +++ b/src/testbed/test_testbed_api.conf | |||
@@ -40,6 +40,7 @@ WAN_QUOTA_IN = 3932160 | |||
40 | [core] | 40 | [core] |
41 | PORT = 12092 | 41 | PORT = 12092 |
42 | AUTOSTART = YES | 42 | AUTOSTART = YES |
43 | USE_EPHEMERAL_KEYS = NO | ||
43 | 44 | ||
44 | [arm] | 45 | [arm] |
45 | DEFAULTSERVICES = core transport | 46 | DEFAULTSERVICES = core transport |
diff --git a/src/testbed/test_testbed_api_testbed_run_topology2dtorus.conf b/src/testbed/test_testbed_api_testbed_run_topology2dtorus.conf index ee0480ed9..5c7cd2271 100644 --- a/src/testbed/test_testbed_api_testbed_run_topology2dtorus.conf +++ b/src/testbed/test_testbed_api_testbed_run_topology2dtorus.conf | |||
@@ -40,6 +40,7 @@ WAN_QUOTA_IN = 3932160 | |||
40 | [core] | 40 | [core] |
41 | PORT = 12092 | 41 | PORT = 12092 |
42 | AUTOSTART = YES | 42 | AUTOSTART = YES |
43 | USE_EPHEMERAL_KEYS = NO | ||
43 | 44 | ||
44 | [arm] | 45 | [arm] |
45 | DEFAULTSERVICES = core transport | 46 | DEFAULTSERVICES = core transport |
diff --git a/src/testbed/test_testbed_api_testbed_run_topologyclique.conf b/src/testbed/test_testbed_api_testbed_run_topologyclique.conf index 4ac926648..a2d44ea21 100644 --- a/src/testbed/test_testbed_api_testbed_run_topologyclique.conf +++ b/src/testbed/test_testbed_api_testbed_run_topologyclique.conf | |||
@@ -40,6 +40,7 @@ WAN_QUOTA_IN = 3932160 | |||
40 | [core] | 40 | [core] |
41 | PORT = 12092 | 41 | PORT = 12092 |
42 | AUTOSTART = YES | 42 | AUTOSTART = YES |
43 | USE_EPHEMERAL_KEYS = NO | ||
43 | 44 | ||
44 | [arm] | 45 | [arm] |
45 | DEFAULTSERVICES = core transport | 46 | DEFAULTSERVICES = core transport |
diff --git a/src/testbed/test_testbed_api_testbed_run_topologyfromfile.conf b/src/testbed/test_testbed_api_testbed_run_topologyfromfile.conf index b66724fb2..fc9fe5ab3 100644 --- a/src/testbed/test_testbed_api_testbed_run_topologyfromfile.conf +++ b/src/testbed/test_testbed_api_testbed_run_topologyfromfile.conf | |||
@@ -41,6 +41,7 @@ WAN_QUOTA_IN = 3932160 | |||
41 | [core] | 41 | [core] |
42 | PORT = 12092 | 42 | PORT = 12092 |
43 | AUTOSTART = YES | 43 | AUTOSTART = YES |
44 | USE_EPHEMERAL_KEYS = NO | ||
44 | 45 | ||
45 | [arm] | 46 | [arm] |
46 | DEFAULTSERVICES = core transport | 47 | DEFAULTSERVICES = core transport |
diff --git a/src/testbed/test_testbed_api_testbed_run_topologyline.conf b/src/testbed/test_testbed_api_testbed_run_topologyline.conf index 289ccba92..5524b4fb9 100644 --- a/src/testbed/test_testbed_api_testbed_run_topologyline.conf +++ b/src/testbed/test_testbed_api_testbed_run_topologyline.conf | |||
@@ -40,6 +40,7 @@ WAN_QUOTA_IN = 3932160 | |||
40 | [core] | 40 | [core] |
41 | PORT = 12092 | 41 | PORT = 12092 |
42 | AUTOSTART = YES | 42 | AUTOSTART = YES |
43 | USE_EPHEMERAL_KEYS = NO | ||
43 | 44 | ||
44 | [arm] | 45 | [arm] |
45 | DEFAULTSERVICES = core transport | 46 | DEFAULTSERVICES = core transport |
diff --git a/src/testbed/test_testbed_api_testbed_run_topologyrandom.conf b/src/testbed/test_testbed_api_testbed_run_topologyrandom.conf index 027602ea0..dc36b4e9e 100644 --- a/src/testbed/test_testbed_api_testbed_run_topologyrandom.conf +++ b/src/testbed/test_testbed_api_testbed_run_topologyrandom.conf | |||
@@ -40,6 +40,7 @@ WAN_QUOTA_IN = 3932160 | |||
40 | [core] | 40 | [core] |
41 | PORT = 12092 | 41 | PORT = 12092 |
42 | AUTOSTART = YES | 42 | AUTOSTART = YES |
43 | USE_EPHEMERAL_KEYS = NO | ||
43 | 44 | ||
44 | [arm] | 45 | [arm] |
45 | DEFAULTSERVICES = core transport | 46 | DEFAULTSERVICES = core transport |
diff --git a/src/testbed/test_testbed_api_testbed_run_topologyring.conf b/src/testbed/test_testbed_api_testbed_run_topologyring.conf index 22d934db8..d8c41d58b 100644 --- a/src/testbed/test_testbed_api_testbed_run_topologyring.conf +++ b/src/testbed/test_testbed_api_testbed_run_topologyring.conf | |||
@@ -40,6 +40,7 @@ WAN_QUOTA_IN = 3932160 | |||
40 | [core] | 40 | [core] |
41 | PORT = 12092 | 41 | PORT = 12092 |
42 | AUTOSTART = YES | 42 | AUTOSTART = YES |
43 | USE_EPHEMERAL_KEYS = NO | ||
43 | 44 | ||
44 | [arm] | 45 | [arm] |
45 | DEFAULTSERVICES = core transport | 46 | DEFAULTSERVICES = core transport |
diff --git a/src/testbed/test_testbed_api_testbed_run_topologyscalefree.conf b/src/testbed/test_testbed_api_testbed_run_topologyscalefree.conf index 22d934db8..d8c41d58b 100644 --- a/src/testbed/test_testbed_api_testbed_run_topologyscalefree.conf +++ b/src/testbed/test_testbed_api_testbed_run_topologyscalefree.conf | |||
@@ -40,6 +40,7 @@ WAN_QUOTA_IN = 3932160 | |||
40 | [core] | 40 | [core] |
41 | PORT = 12092 | 41 | PORT = 12092 |
42 | AUTOSTART = YES | 42 | AUTOSTART = YES |
43 | USE_EPHEMERAL_KEYS = NO | ||
43 | 44 | ||
44 | [arm] | 45 | [arm] |
45 | DEFAULTSERVICES = core transport | 46 | DEFAULTSERVICES = core transport |
diff --git a/src/testbed/test_testbed_api_testbed_run_topologysmallworld.conf b/src/testbed/test_testbed_api_testbed_run_topologysmallworld.conf index fabc74f37..08537cb8d 100644 --- a/src/testbed/test_testbed_api_testbed_run_topologysmallworld.conf +++ b/src/testbed/test_testbed_api_testbed_run_topologysmallworld.conf | |||
@@ -40,6 +40,7 @@ WAN_QUOTA_IN = 3932160 | |||
40 | [core] | 40 | [core] |
41 | PORT = 12092 | 41 | PORT = 12092 |
42 | AUTOSTART = YES | 42 | AUTOSTART = YES |
43 | USE_EPHEMERAL_KEYS = NO | ||
43 | 44 | ||
44 | [arm] | 45 | [arm] |
45 | DEFAULTSERVICES = core transport | 46 | DEFAULTSERVICES = core transport |
diff --git a/src/testbed/test_testbed_api_testbed_run_topologysmallworldring.conf b/src/testbed/test_testbed_api_testbed_run_topologysmallworldring.conf index 7b26f4f27..637ad25a0 100644 --- a/src/testbed/test_testbed_api_testbed_run_topologysmallworldring.conf +++ b/src/testbed/test_testbed_api_testbed_run_topologysmallworldring.conf | |||
@@ -40,6 +40,7 @@ WAN_QUOTA_IN = 3932160 | |||
40 | [core] | 40 | [core] |
41 | PORT = 12092 | 41 | PORT = 12092 |
42 | AUTOSTART = YES | 42 | AUTOSTART = YES |
43 | USE_EPHEMERAL_KEYS = NO | ||
43 | 44 | ||
44 | [arm] | 45 | [arm] |
45 | DEFAULTSERVICES = core transport | 46 | DEFAULTSERVICES = core transport |