aboutsummaryrefslogtreecommitdiff
path: root/src/hostlist/test_gnunet_daemon_hostlist.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-01-20 21:06:42 +0000
committerChristian Grothoff <christian@grothoff.org>2010-01-20 21:06:42 +0000
commite6976d9aadb2e6cc4005d33174688c3d86416ed2 (patch)
tree3bcc3067a9b36cef3980fe81361f7aba7bfcc22f /src/hostlist/test_gnunet_daemon_hostlist.c
parentbe4b1dd005c4552b84411e2ba2b81972e367c0e4 (diff)
downloadgnunet-e6976d9aadb2e6cc4005d33174688c3d86416ed2.tar.gz
gnunet-e6976d9aadb2e6cc4005d33174688c3d86416ed2.zip
fixing non-transport compilation issues
Diffstat (limited to 'src/hostlist/test_gnunet_daemon_hostlist.c')
-rw-r--r--src/hostlist/test_gnunet_daemon_hostlist.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/hostlist/test_gnunet_daemon_hostlist.c b/src/hostlist/test_gnunet_daemon_hostlist.c
index 904990a83..f9d2e9169 100644
--- a/src/hostlist/test_gnunet_daemon_hostlist.c
+++ b/src/hostlist/test_gnunet_daemon_hostlist.c
@@ -95,11 +95,13 @@ timeout_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
95 * @param cls closure 95 * @param cls closure
96 * @param peer the peer that connected 96 * @param peer the peer that connected
97 * @param latency current latency of the connection 97 * @param latency current latency of the connection
98 * @param distance in overlay hops, as given by transport plugin
98 */ 99 */
99static void 100static void
100notify_connect (void *cls, 101notify_connect (void *cls,
101 const struct GNUNET_PeerIdentity * peer, 102 const struct GNUNET_PeerIdentity * peer,
102 struct GNUNET_TIME_Relative latency) 103 struct GNUNET_TIME_Relative latency,
104 unsigned int distance)
103{ 105{
104 if (peer == NULL) 106 if (peer == NULL)
105 return; 107 return;
@@ -120,14 +122,11 @@ notify_connect (void *cls,
120 122
121static void 123static void
122process_hello (void *cls, 124process_hello (void *cls,
123 struct GNUNET_TIME_Relative latency,
124 const struct GNUNET_PeerIdentity *peer,
125 const struct GNUNET_MessageHeader *message) 125 const struct GNUNET_MessageHeader *message)
126{ 126{
127 struct PeerContext *p = cls; 127 struct PeerContext *p = cls;
128 128
129 if (message == NULL) 129 GNUNET_TRANSPORT_get_hello_cancel (p->th, &process_hello, p);
130 return;
131 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 130 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
132 "Received HELLO, starting hostlist service.\n"); 131 "Received HELLO, starting hostlist service.\n");
133 GNUNET_ARM_start_services (p->cfg, sched, "hostlist", NULL); 132 GNUNET_ARM_start_services (p->cfg, sched, "hostlist", NULL);
@@ -151,7 +150,7 @@ setup_peer (struct PeerContext *p, const char *cfgname)
151 p->th = GNUNET_TRANSPORT_connect (sched, p->cfg, p, NULL, 150 p->th = GNUNET_TRANSPORT_connect (sched, p->cfg, p, NULL,
152 &notify_connect, NULL); 151 &notify_connect, NULL);
153 GNUNET_assert (p->th != NULL); 152 GNUNET_assert (p->th != NULL);
154 GNUNET_TRANSPORT_get_hello (p->th, TIMEOUT, &process_hello, p); 153 GNUNET_TRANSPORT_get_hello (p->th, &process_hello, p);
155} 154}
156 155
157 156