aboutsummaryrefslogtreecommitdiff
path: root/src/hostlist
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/hostlist
parent8439fe12f24ab3ae5a1821face2b79d443fa044e (diff)
downloadgnunet-147d72a99e4ed0558c98fe7c9c41062ede51a68a.tar.gz
gnunet-147d72a99e4ed0558c98fe7c9c41062ede51a68a.zip
cleanup API for get_hello and get_hello_cancel
Diffstat (limited to 'src/hostlist')
-rw-r--r--src/hostlist/test_gnunet_daemon_hostlist.c5
-rw-r--r--src/hostlist/test_gnunet_daemon_hostlist_reconnect.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/src/hostlist/test_gnunet_daemon_hostlist.c b/src/hostlist/test_gnunet_daemon_hostlist.c
index 909b946e7..b6d0a1736 100644
--- a/src/hostlist/test_gnunet_daemon_hostlist.c
+++ b/src/hostlist/test_gnunet_daemon_hostlist.c
@@ -46,6 +46,7 @@ struct PeerContext
46 struct GNUNET_CONFIGURATION_Handle *cfg; 46 struct GNUNET_CONFIGURATION_Handle *cfg;
47 struct GNUNET_TRANSPORT_Handle *th; 47 struct GNUNET_TRANSPORT_Handle *th;
48 struct GNUNET_MessageHeader *hello; 48 struct GNUNET_MessageHeader *hello;
49 struct GNUNET_TRANSPORT_GetHelloHandle *ghh;
49#if START_ARM 50#if START_ARM
50 struct GNUNET_OS_Process *arm_proc; 51 struct GNUNET_OS_Process *arm_proc;
51#endif 52#endif
@@ -117,7 +118,7 @@ process_hello (void *cls, const struct GNUNET_MessageHeader *message)
117{ 118{
118 struct PeerContext *p = cls; 119 struct PeerContext *p = cls;
119 120
120 GNUNET_TRANSPORT_get_hello_cancel (p->th, &process_hello, p); 121 GNUNET_TRANSPORT_get_hello_cancel (p->ghh);
121 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 122 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
122 "Received HELLO, starting hostlist service.\n"); 123 "Received HELLO, starting hostlist service.\n");
123} 124}
@@ -140,7 +141,7 @@ setup_peer (struct PeerContext *p, const char *cfgname)
140 p->th = 141 p->th =
141 GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, &notify_connect, NULL); 142 GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, &notify_connect, NULL);
142 GNUNET_assert (p->th != NULL); 143 GNUNET_assert (p->th != NULL);
143 GNUNET_TRANSPORT_get_hello (p->th, &process_hello, p); 144 p->ghh = GNUNET_TRANSPORT_get_hello (p->th, &process_hello, p);
144} 145}
145 146
146 147
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
index ff625cf8e..078c2a54e 100644
--- a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
+++ b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
@@ -47,6 +47,7 @@ struct PeerContext
47 struct GNUNET_CONFIGURATION_Handle *cfg; 47 struct GNUNET_CONFIGURATION_Handle *cfg;
48 struct GNUNET_TRANSPORT_Handle *th; 48 struct GNUNET_TRANSPORT_Handle *th;
49 struct GNUNET_MessageHeader *hello; 49 struct GNUNET_MessageHeader *hello;
50 struct GNUNET_TRANSPORT_GetHelloHandle *ghh;
50#if START_ARM 51#if START_ARM
51 struct GNUNET_OS_Process *arm_proc; 52 struct GNUNET_OS_Process *arm_proc;
52#endif 53#endif
@@ -121,7 +122,7 @@ process_hello (void *cls, const struct GNUNET_MessageHeader *message)
121{ 122{
122 struct PeerContext *p = cls; 123 struct PeerContext *p = cls;
123 124
124 GNUNET_TRANSPORT_get_hello_cancel (p->th, &process_hello, p); 125 GNUNET_TRANSPORT_get_hello_cancel (p->ghh);
125 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 126 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
126 "Received HELLO, starting hostlist service.\n"); 127 "Received HELLO, starting hostlist service.\n");
127} 128}
@@ -144,7 +145,7 @@ setup_peer (struct PeerContext *p, const char *cfgname)
144 p->th = 145 p->th =
145 GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, &notify_connect, NULL); 146 GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, &notify_connect, NULL);
146 GNUNET_assert (p->th != NULL); 147 GNUNET_assert (p->th != NULL);
147 GNUNET_TRANSPORT_get_hello (p->th, &process_hello, p); 148 p->ghh = GNUNET_TRANSPORT_get_hello (p->th, &process_hello, p);
148} 149}
149 150
150 151