aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/gnunet-service-cadet_hello.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cadet/gnunet-service-cadet_hello.c')
-rw-r--r--src/cadet/gnunet-service-cadet_hello.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/cadet/gnunet-service-cadet_hello.c b/src/cadet/gnunet-service-cadet_hello.c
index 7a33b0e05..1e3322733 100644
--- a/src/cadet/gnunet-service-cadet_hello.c
+++ b/src/cadet/gnunet-service-cadet_hello.c
@@ -68,7 +68,6 @@ got_hello (void *cls,
68 const char *err_msg) 68 const char *err_msg)
69{ 69{
70 struct CadetPeer *peer; 70 struct CadetPeer *peer;
71 struct GNUNET_HELLO_Builder *builder = GNUNET_HELLO_builder_from_msg (hello);
72 71
73 if ((NULL == id) || 72 if ((NULL == id) ||
74 (NULL == hello)) 73 (NULL == hello))
@@ -81,19 +80,17 @@ got_hello (void *cls,
81 GCD_hello_update (); 80 GCD_hello_update ();
82 return; 81 return;
83 } 82 }
84 83
85 LOG (GNUNET_ERROR_TYPE_DEBUG, 84 LOG (GNUNET_ERROR_TYPE_DEBUG,
86 "Hello for %s (%d bytes), expires on %s\n", 85 "Hello for %s (%d bytes), expires on %s\n",
87 GNUNET_i2s (id), 86 GNUNET_i2s (id),
88 sizeof (hello), 87 sizeof (hello),
89 GNUNET_STRINGS_absolute_time_to_string ( 88 GNUNET_STRINGS_absolute_time_to_string (
90 GNUNET_HELLO_builder_get_expiration_time (builder, 89 GNUNET_HELLO_builder_get_expiration_time (hello)));
91 hello)));
92 peer = GCP_get (id, 90 peer = GCP_get (id,
93 GNUNET_YES); 91 GNUNET_YES);
94 GCP_set_hello (peer, 92 GCP_set_hello (peer,
95 hello); 93 hello);
96 GNUNET_HELLO_builder_free (builder);
97} 94}
98 95
99 96
@@ -108,8 +105,8 @@ GCH_init (const struct GNUNET_CONFIGURATION_Handle *c)
108 GNUNET_assert (NULL == peerstore_notify); 105 GNUNET_assert (NULL == peerstore_notify);
109 peerstore = GNUNET_PEERSTORE_connect (c); 106 peerstore = GNUNET_PEERSTORE_connect (c);
110 peerstore_notify = 107 peerstore_notify =
111 GNUNET_PEERSTORE_hello_changed_notify (peerstore, GNUNET_NO, &got_hello, 108 GNUNET_PEERSTORE_hello_changed_notify (peerstore, GNUNET_NO, &got_hello,
112 NULL); 109 NULL);
113} 110}
114 111
115 112