diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-07-30 17:33:48 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-07-30 17:33:48 +0000 |
commit | f87f930cb42261aa3890ed40aff78f9a009c6e18 (patch) | |
tree | 94751c2990465d096ab587fc818aed66ff928e5f /src/hostlist/test_gnunet_daemon_hostlist_reconnect.c | |
parent | 24dc89edc8d7f9eb5f23cd3e804fd9732858fbee (diff) | |
download | gnunet-f87f930cb42261aa3890ed40aff78f9a009c6e18.tar.gz gnunet-f87f930cb42261aa3890ed40aff78f9a009c6e18.zip |
convert to new hello_get API
Diffstat (limited to 'src/hostlist/test_gnunet_daemon_hostlist_reconnect.c')
-rw-r--r-- | src/hostlist/test_gnunet_daemon_hostlist_reconnect.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c index e0c193ed3..2ebc780a7 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c +++ b/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include "gnunet_util_lib.h" | 27 | #include "gnunet_util_lib.h" |
28 | #include "gnunet_arm_service.h" | 28 | #include "gnunet_arm_service.h" |
29 | #include "gnunet_transport_core_service.h" | 29 | #include "gnunet_transport_core_service.h" |
30 | #include "gnunet_transport_hello_service.h" | ||
30 | 31 | ||
31 | /** | 32 | /** |
32 | * How long until we give up on transmitting the message? | 33 | * How long until we give up on transmitting the message? |
@@ -42,7 +43,7 @@ struct PeerContext | |||
42 | struct GNUNET_CONFIGURATION_Handle *cfg; | 43 | struct GNUNET_CONFIGURATION_Handle *cfg; |
43 | struct GNUNET_TRANSPORT_CoreHandle *th; | 44 | struct GNUNET_TRANSPORT_CoreHandle *th; |
44 | struct GNUNET_MessageHeader *hello; | 45 | struct GNUNET_MessageHeader *hello; |
45 | struct GNUNET_TRANSPORT_GetHelloHandle *ghh; | 46 | struct GNUNET_TRANSPORT_HelloGetHandle *ghh; |
46 | struct GNUNET_OS_Process *arm_proc; | 47 | struct GNUNET_OS_Process *arm_proc; |
47 | }; | 48 | }; |
48 | 49 | ||
@@ -73,7 +74,7 @@ timeout_error (void *cls) | |||
73 | * @param mq message queue to send to @a peer | 74 | * @param mq message queue to send to @a peer |
74 | * @return NULL | 75 | * @return NULL |
75 | */ | 76 | */ |
76 | static void | 77 | static void * |
77 | notify_connect (void *cls, | 78 | notify_connect (void *cls, |
78 | const struct GNUNET_PeerIdentity *peer, | 79 | const struct GNUNET_PeerIdentity *peer, |
79 | struct GNUNET_MQ_Handle *mq) | 80 | struct GNUNET_MQ_Handle *mq) |
@@ -92,7 +93,7 @@ process_hello (void *cls, | |||
92 | { | 93 | { |
93 | struct PeerContext *p = cls; | 94 | struct PeerContext *p = cls; |
94 | 95 | ||
95 | GNUNET_TRANSPORT_get_hello_cancel (p->ghh); | 96 | GNUNET_TRANSPORT_hello_get_cancel (p->ghh); |
96 | p->ghh = NULL; | 97 | p->ghh = NULL; |
97 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 98 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
98 | "Received HELLO, starting hostlist service.\n"); | 99 | "Received HELLO, starting hostlist service.\n"); |
@@ -129,7 +130,8 @@ setup_peer (struct PeerContext *p, | |||
129 | NULL, | 130 | NULL, |
130 | NULL); | 131 | NULL); |
131 | GNUNET_assert (NULL != p->th); | 132 | GNUNET_assert (NULL != p->th); |
132 | p->ghh = GNUNET_TRANSPORT_get_hello (p->cfg, | 133 | p->ghh = GNUNET_TRANSPORT_hello_get (p->cfg, |
134 | GNUNET_TRANSPORT_AC_ANY, | ||
133 | &process_hello, | 135 | &process_hello, |
134 | p); | 136 | p); |
135 | GNUNET_free (binary); | 137 | GNUNET_free (binary); |
@@ -184,7 +186,7 @@ shutdown_task (void *cls) | |||
184 | } | 186 | } |
185 | if (NULL != p1.ghh) | 187 | if (NULL != p1.ghh) |
186 | { | 188 | { |
187 | GNUNET_TRANSPORT_get_hello_cancel (p1.ghh); | 189 | GNUNET_TRANSPORT_hello_get_cancel (p1.ghh); |
188 | p1.ghh = NULL; | 190 | p1.ghh = NULL; |
189 | } | 191 | } |
190 | if (NULL != p1.th) | 192 | if (NULL != p1.th) |
@@ -194,7 +196,7 @@ shutdown_task (void *cls) | |||
194 | } | 196 | } |
195 | if (NULL != p2.ghh) | 197 | if (NULL != p2.ghh) |
196 | { | 198 | { |
197 | GNUNET_TRANSPORT_get_hello_cancel (p2.ghh); | 199 | GNUNET_TRANSPORT_hello_get_cancel (p2.ghh); |
198 | p2.ghh = NULL; | 200 | p2.ghh = NULL; |
199 | } | 201 | } |
200 | if (NULL != p2.th) | 202 | if (NULL != p2.th) |