diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-09-02 11:21:00 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-09-02 11:21:00 +0000 |
commit | 147d72a99e4ed0558c98fe7c9c41062ede51a68a (patch) | |
tree | f712c8aa222e53dc3e299972f3144ad92b15b180 /src/core/test_core_api_reliability.c | |
parent | 8439fe12f24ab3ae5a1821face2b79d443fa044e (diff) | |
download | gnunet-147d72a99e4ed0558c98fe7c9c41062ede51a68a.tar.gz gnunet-147d72a99e4ed0558c98fe7c9c41062ede51a68a.zip |
cleanup API for get_hello and get_hello_cancel
Diffstat (limited to 'src/core/test_core_api_reliability.c')
-rw-r--r-- | src/core/test_core_api_reliability.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/test_core_api_reliability.c b/src/core/test_core_api_reliability.c index 47d1ae8ac..ad6e6a761 100644 --- a/src/core/test_core_api_reliability.c +++ b/src/core/test_core_api_reliability.c | |||
@@ -74,6 +74,7 @@ struct PeerContext | |||
74 | struct GNUNET_PeerIdentity id; | 74 | struct GNUNET_PeerIdentity id; |
75 | struct GNUNET_TRANSPORT_Handle *th; | 75 | struct GNUNET_TRANSPORT_Handle *th; |
76 | struct GNUNET_MessageHeader *hello; | 76 | struct GNUNET_MessageHeader *hello; |
77 | struct GNUNET_TRANSPORT_GetHelloHandle *ghh; | ||
77 | int connect_status; | 78 | int connect_status; |
78 | #if START_ARM | 79 | #if START_ARM |
79 | struct GNUNET_OS_Process *arm_proc; | 80 | struct GNUNET_OS_Process *arm_proc; |
@@ -121,8 +122,8 @@ terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
121 | { | 122 | { |
122 | unsigned long long delta; | 123 | unsigned long long delta; |
123 | 124 | ||
124 | GNUNET_TRANSPORT_get_hello_cancel (p1.th, &process_hello, &p1); | 125 | GNUNET_TRANSPORT_get_hello_cancel (p1.ghh); |
125 | GNUNET_TRANSPORT_get_hello_cancel (p2.th, &process_hello, &p2); | 126 | GNUNET_TRANSPORT_get_hello_cancel (p2.ghh); |
126 | GNUNET_CORE_disconnect (p1.ch); | 127 | GNUNET_CORE_disconnect (p1.ch); |
127 | p1.ch = NULL; | 128 | p1.ch = NULL; |
128 | GNUNET_CORE_disconnect (p2.ch); | 129 | GNUNET_CORE_disconnect (p2.ch); |
@@ -156,13 +157,13 @@ terminate_task_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
156 | } | 157 | } |
157 | if (p1.th != NULL) | 158 | if (p1.th != NULL) |
158 | { | 159 | { |
159 | GNUNET_TRANSPORT_get_hello_cancel (p1.th, &process_hello, &p1); | 160 | GNUNET_TRANSPORT_get_hello_cancel (p1.ghh); |
160 | GNUNET_TRANSPORT_disconnect (p1.th); | 161 | GNUNET_TRANSPORT_disconnect (p1.th); |
161 | p1.th = NULL; | 162 | p1.th = NULL; |
162 | } | 163 | } |
163 | if (p2.th != NULL) | 164 | if (p2.th != NULL) |
164 | { | 165 | { |
165 | GNUNET_TRANSPORT_get_hello_cancel (p2.th, &process_hello, &p2); | 166 | GNUNET_TRANSPORT_get_hello_cancel (p2.ghh); |
166 | GNUNET_TRANSPORT_disconnect (p2.th); | 167 | GNUNET_TRANSPORT_disconnect (p2.th); |
167 | p2.th = NULL; | 168 | p2.th = NULL; |
168 | } | 169 | } |
@@ -436,7 +437,7 @@ setup_peer (struct PeerContext *p, const char *cfgname) | |||
436 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); | 437 | GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); |
437 | p->th = GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, NULL, NULL); | 438 | p->th = GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, NULL, NULL); |
438 | GNUNET_assert (p->th != NULL); | 439 | GNUNET_assert (p->th != NULL); |
439 | GNUNET_TRANSPORT_get_hello (p->th, &process_hello, p); | 440 | p->ghh = GNUNET_TRANSPORT_get_hello (p->th, &process_hello, p); |
440 | } | 441 | } |
441 | 442 | ||
442 | 443 | ||