aboutsummaryrefslogtreecommitdiff
path: root/src/core/test_core_quota_compliance.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-09-02 11:21:00 +0000
committerChristian Grothoff <christian@grothoff.org>2011-09-02 11:21:00 +0000
commit147d72a99e4ed0558c98fe7c9c41062ede51a68a (patch)
treef712c8aa222e53dc3e299972f3144ad92b15b180 /src/core/test_core_quota_compliance.c
parent8439fe12f24ab3ae5a1821face2b79d443fa044e (diff)
downloadgnunet-147d72a99e4ed0558c98fe7c9c41062ede51a68a.tar.gz
gnunet-147d72a99e4ed0558c98fe7c9c41062ede51a68a.zip
cleanup API for get_hello and get_hello_cancel
Diffstat (limited to 'src/core/test_core_quota_compliance.c')
-rw-r--r--src/core/test_core_quota_compliance.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c
index 41d156c6b..d955e0fd0 100644
--- a/src/core/test_core_quota_compliance.c
+++ b/src/core/test_core_quota_compliance.c
@@ -81,6 +81,7 @@ struct PeerContext
81 struct GNUNET_TRANSPORT_Handle *th; 81 struct GNUNET_TRANSPORT_Handle *th;
82 struct GNUNET_MessageHeader *hello; 82 struct GNUNET_MessageHeader *hello;
83 struct GNUNET_STATISTICS_Handle *stats; 83 struct GNUNET_STATISTICS_Handle *stats;
84 struct GNUNET_TRANSPORT_GetHelloHandle *ghh;
84 int connect_status; 85 int connect_status;
85#if START_ARM 86#if START_ARM
86 struct GNUNET_OS_Process *arm_proc; 87 struct GNUNET_OS_Process *arm_proc;
@@ -122,8 +123,8 @@ terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
122{ 123{
123 struct GNUNET_CORE_Handle *ch; 124 struct GNUNET_CORE_Handle *ch;
124 125
125 GNUNET_TRANSPORT_get_hello_cancel (p2.th, &process_hello, &p2); 126 GNUNET_TRANSPORT_get_hello_cancel (p2.ghh);
126 GNUNET_TRANSPORT_get_hello_cancel (p1.th, &process_hello, &p1); 127 GNUNET_TRANSPORT_get_hello_cancel (p1.ghh);
127 ch = p1.ch; 128 ch = p1.ch;
128 p1.ch = NULL; 129 p1.ch = NULL;
129 GNUNET_CORE_disconnect (ch); 130 GNUNET_CORE_disconnect (ch);
@@ -147,8 +148,8 @@ terminate_task_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
147 if (measure_task != GNUNET_SCHEDULER_NO_TASK) 148 if (measure_task != GNUNET_SCHEDULER_NO_TASK)
148 GNUNET_SCHEDULER_cancel (measure_task); 149 GNUNET_SCHEDULER_cancel (measure_task);
149 150
150 GNUNET_TRANSPORT_get_hello_cancel (p1.th, &process_hello, &p1); 151 GNUNET_TRANSPORT_get_hello_cancel (p1.ghh);
151 GNUNET_TRANSPORT_get_hello_cancel (p2.th, &process_hello, &p2); 152 GNUNET_TRANSPORT_get_hello_cancel (p2.ghh);
152 153
153 GNUNET_CORE_disconnect (p1.ch); 154 GNUNET_CORE_disconnect (p1.ch);
154 p1.ch = NULL; 155 p1.ch = NULL;
@@ -563,7 +564,7 @@ setup_peer (struct PeerContext *p, const char *cfgname)
563 GNUNET_assert (p->stats != NULL); 564 GNUNET_assert (p->stats != NULL);
564 p->th = GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, NULL, NULL); 565 p->th = GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, NULL, NULL);
565 GNUNET_assert (p->th != NULL); 566 GNUNET_assert (p->th != NULL);
566 GNUNET_TRANSPORT_get_hello (p->th, &process_hello, p); 567 p->ghh = GNUNET_TRANSPORT_get_hello (p->th, &process_hello, p);
567} 568}
568 569
569 570