aboutsummaryrefslogtreecommitdiff
path: root/src/hostlist/test_gnunet_daemon_hostlist.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-07-30 17:33:48 +0000
committerChristian Grothoff <christian@grothoff.org>2016-07-30 17:33:48 +0000
commitf87f930cb42261aa3890ed40aff78f9a009c6e18 (patch)
tree94751c2990465d096ab587fc818aed66ff928e5f /src/hostlist/test_gnunet_daemon_hostlist.c
parent24dc89edc8d7f9eb5f23cd3e804fd9732858fbee (diff)
downloadgnunet-f87f930cb42261aa3890ed40aff78f9a009c6e18.tar.gz
gnunet-f87f930cb42261aa3890ed40aff78f9a009c6e18.zip
convert to new hello_get API
Diffstat (limited to 'src/hostlist/test_gnunet_daemon_hostlist.c')
-rw-r--r--src/hostlist/test_gnunet_daemon_hostlist.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/hostlist/test_gnunet_daemon_hostlist.c b/src/hostlist/test_gnunet_daemon_hostlist.c
index 9a1e6d3d7..eb4a85115 100644
--- a/src/hostlist/test_gnunet_daemon_hostlist.c
+++ b/src/hostlist/test_gnunet_daemon_hostlist.c
@@ -27,6 +27,7 @@
27#include "gnunet_arm_service.h" 27#include "gnunet_arm_service.h"
28#include "gnunet_transport_service.h" 28#include "gnunet_transport_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/** 33/**
@@ -43,7 +44,7 @@ struct PeerContext
43 struct GNUNET_CONFIGURATION_Handle *cfg; 44 struct GNUNET_CONFIGURATION_Handle *cfg;
44 struct GNUNET_TRANSPORT_CoreHandle *th; 45 struct GNUNET_TRANSPORT_CoreHandle *th;
45 struct GNUNET_MessageHeader *hello; 46 struct GNUNET_MessageHeader *hello;
46 struct GNUNET_TRANSPORT_GetHelloHandle *ghh; 47 struct GNUNET_TRANSPORT_HelloGetHandle *ghh;
47 struct GNUNET_OS_Process *arm_proc; 48 struct GNUNET_OS_Process *arm_proc;
48}; 49};
49 50
@@ -59,7 +60,7 @@ clean_up (void *cls)
59 { 60 {
60 if (NULL != p1.ghh) 61 if (NULL != p1.ghh)
61 { 62 {
62 GNUNET_TRANSPORT_get_hello_cancel (p1.ghh); 63 GNUNET_TRANSPORT_hello_get_cancel (p1.ghh);
63 p1.ghh = NULL; 64 p1.ghh = NULL;
64 } 65 }
65 GNUNET_TRANSPORT_core_disconnect (p1.th); 66 GNUNET_TRANSPORT_core_disconnect (p1.th);
@@ -69,7 +70,7 @@ clean_up (void *cls)
69 { 70 {
70 if (NULL != p2.ghh) 71 if (NULL != p2.ghh)
71 { 72 {
72 GNUNET_TRANSPORT_get_hello_cancel (p2.ghh); 73 GNUNET_TRANSPORT_hello_get_cancel (p2.ghh);
73 p2.ghh = NULL; 74 p2.ghh = NULL;
74 } 75 }
75 GNUNET_TRANSPORT_core_disconnect (p2.th); 76 GNUNET_TRANSPORT_core_disconnect (p2.th);
@@ -125,7 +126,7 @@ process_hello (void *cls,
125{ 126{
126 struct PeerContext *p = cls; 127 struct PeerContext *p = cls;
127 128
128 GNUNET_TRANSPORT_get_hello_cancel (p->ghh); 129 GNUNET_TRANSPORT_hello_get_cancel (p->ghh);
129 p->ghh = NULL; 130 p->ghh = NULL;
130 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 131 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
131 "Received HELLO, starting hostlist service.\n"); 132 "Received HELLO, starting hostlist service.\n");
@@ -161,8 +162,9 @@ setup_peer (struct PeerContext *p,
161 &notify_connect, 162 &notify_connect,
162 NULL, 163 NULL,
163 NULL); 164 NULL);
164 GNUNET_assert (p->th != NULL); 165 GNUNET_assert (NULL != p->th);
165 p->ghh = GNUNET_TRANSPORT_get_hello (p->cfg, 166 p->ghh = GNUNET_TRANSPORT_hello_get (p->cfg,
167 GNUNET_TRANSPORT_AC_ANY,
166 &process_hello, 168 &process_hello,
167 p); 169 p);
168 GNUNET_free (binary); 170 GNUNET_free (binary);