aboutsummaryrefslogtreecommitdiff
path: root/src/core/test_core_api_reliability.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-08-01 20:41:37 +0000
committerChristian Grothoff <christian@grothoff.org>2011-08-01 20:41:37 +0000
commite1a53be7657cf0ab0b6a25adbf6bf6649016e368 (patch)
tree5a100dffae2cbf6d7f81ffcb7a1ebbcc4f46cb1c /src/core/test_core_api_reliability.c
parent8d0d6ec587246509a7a351775afc9fc815199b15 (diff)
downloadgnunet-e1a53be7657cf0ab0b6a25adbf6bf6649016e368.tar.gz
gnunet-e1a53be7657cf0ab0b6a25adbf6bf6649016e368.zip
LRN: Keep passing HELLO messages to transport
in core preferences, reliability and quota compliance tests, because first HELLO might be empty
Diffstat (limited to 'src/core/test_core_api_reliability.c')
-rw-r--r--src/core/test_core_api_reliability.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/test_core_api_reliability.c b/src/core/test_core_api_reliability.c
index fe0162188..b279acb91 100644
--- a/src/core/test_core_api_reliability.c
+++ b/src/core/test_core_api_reliability.c
@@ -112,12 +112,15 @@ get_size (unsigned int iter)
112 return sizeof (struct TestMessage) + (ret % 60000); 112 return sizeof (struct TestMessage) + (ret % 60000);
113} 113}
114 114
115static void process_hello (void *cls, const struct GNUNET_MessageHeader *message);
115 116
116static void 117static void
117terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 118terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
118{ 119{
119 unsigned long long delta; 120 unsigned long long delta;
120 121
122 GNUNET_TRANSPORT_get_hello_cancel (p1.th, &process_hello, &p1);
123 GNUNET_TRANSPORT_get_hello_cancel (p2.th, &process_hello, &p2);
121 GNUNET_CORE_disconnect (p1.ch); 124 GNUNET_CORE_disconnect (p1.ch);
122 p1.ch = NULL; 125 p1.ch = NULL;
123 GNUNET_CORE_disconnect (p2.ch); 126 GNUNET_CORE_disconnect (p2.ch);
@@ -151,11 +154,13 @@ terminate_task_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
151 } 154 }
152 if (p1.th != NULL) 155 if (p1.th != NULL)
153 { 156 {
157 GNUNET_TRANSPORT_get_hello_cancel (p1.th, &process_hello, &p1);
154 GNUNET_TRANSPORT_disconnect (p1.th); 158 GNUNET_TRANSPORT_disconnect (p1.th);
155 p1.th = NULL; 159 p1.th = NULL;
156 } 160 }
157 if (p2.th != NULL) 161 if (p2.th != NULL)
158 { 162 {
163 GNUNET_TRANSPORT_get_hello_cancel (p2.th, &process_hello, &p2);
159 GNUNET_TRANSPORT_disconnect (p2.th); 164 GNUNET_TRANSPORT_disconnect (p2.th);
160 p2.th = NULL; 165 p2.th = NULL;
161 } 166 }
@@ -437,7 +442,6 @@ process_hello (void *cls,
437{ 442{
438 struct PeerContext *p = cls; 443 struct PeerContext *p = cls;
439 444
440 GNUNET_TRANSPORT_get_hello_cancel (p->th, &process_hello, p);
441 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 445 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
442 "Received (my) `%s' from transport service\n", 446 "Received (my) `%s' from transport service\n",
443 "HELLO"); 447 "HELLO");