diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-08-01 20:41:37 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-08-01 20:41:37 +0000 |
commit | e1a53be7657cf0ab0b6a25adbf6bf6649016e368 (patch) | |
tree | 5a100dffae2cbf6d7f81ffcb7a1ebbcc4f46cb1c /src/core/test_core_quota_compliance.c | |
parent | 8d0d6ec587246509a7a351775afc9fc815199b15 (diff) | |
download | gnunet-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_quota_compliance.c')
-rw-r--r-- | src/core/test_core_quota_compliance.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c index 593ffa120..03a7c62eb 100644 --- a/src/core/test_core_quota_compliance.c +++ b/src/core/test_core_quota_compliance.c | |||
@@ -114,11 +114,15 @@ struct TestMessage | |||
114 | uint32_t num; | 114 | uint32_t num; |
115 | }; | 115 | }; |
116 | 116 | ||
117 | static void process_hello (void *cls, const struct GNUNET_MessageHeader *message); | ||
118 | |||
117 | static void | 119 | static void |
118 | terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 120 | terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
119 | { | 121 | { |
120 | struct GNUNET_CORE_Handle *ch; | 122 | struct GNUNET_CORE_Handle *ch; |
121 | 123 | ||
124 | GNUNET_TRANSPORT_get_hello_cancel (p2.th, &process_hello, &p2); | ||
125 | GNUNET_TRANSPORT_get_hello_cancel (p1.th, &process_hello, &p1); | ||
122 | ch = p1.ch; | 126 | ch = p1.ch; |
123 | p1.ch = NULL; | 127 | p1.ch = NULL; |
124 | GNUNET_CORE_disconnect (ch); | 128 | GNUNET_CORE_disconnect (ch); |
@@ -142,6 +146,9 @@ terminate_task_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
142 | if (measure_task != GNUNET_SCHEDULER_NO_TASK) | 146 | if (measure_task != GNUNET_SCHEDULER_NO_TASK) |
143 | GNUNET_SCHEDULER_cancel(measure_task); | 147 | GNUNET_SCHEDULER_cancel(measure_task); |
144 | 148 | ||
149 | GNUNET_TRANSPORT_get_hello_cancel (p1.th, &process_hello, &p1); | ||
150 | GNUNET_TRANSPORT_get_hello_cancel (p2.th, &process_hello, &p2); | ||
151 | |||
145 | GNUNET_CORE_disconnect (p1.ch); | 152 | GNUNET_CORE_disconnect (p1.ch); |
146 | p1.ch = NULL; | 153 | p1.ch = NULL; |
147 | GNUNET_CORE_disconnect (p2.ch); | 154 | GNUNET_CORE_disconnect (p2.ch); |
@@ -572,7 +579,6 @@ process_hello (void *cls, | |||
572 | { | 579 | { |
573 | struct PeerContext *p = cls; | 580 | struct PeerContext *p = cls; |
574 | 581 | ||
575 | GNUNET_TRANSPORT_get_hello_cancel (p->th, &process_hello, p); | ||
576 | 582 | ||
577 | #if DEBUG_TRANSMISSION | 583 | #if DEBUG_TRANSMISSION |
578 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 584 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |