diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-04-24 12:41:20 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-04-24 12:41:20 +0000 |
commit | e900e2e90ee6925981279880eb522f0c4e5e0fb3 (patch) | |
tree | 8741d8526da83fbc72746caed6c48a7449168d64 /src/transport/gnunet-service-transport_hello.c | |
parent | c8cfa4e649e72445c97ef2c53feaf3724ac288a5 (diff) | |
download | gnunet-e900e2e90ee6925981279880eb522f0c4e5e0fb3.tar.gz gnunet-e900e2e90ee6925981279880eb522f0c4e5e0fb3.zip |
- assertions and checks for mantis 2283
Diffstat (limited to 'src/transport/gnunet-service-transport_hello.c')
-rw-r--r-- | src/transport/gnunet-service-transport_hello.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/transport/gnunet-service-transport_hello.c b/src/transport/gnunet-service-transport_hello.c index 120f17668..3e80aec02 100644 --- a/src/transport/gnunet-service-transport_hello.c +++ b/src/transport/gnunet-service-transport_hello.c | |||
@@ -162,13 +162,17 @@ refresh_hello_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
162 | gc.expiration = | 162 | gc.expiration = |
163 | GNUNET_TIME_relative_to_absolute | 163 | GNUNET_TIME_relative_to_absolute |
164 | (GNUNET_CONSTANTS_HELLO_ADDRESS_EXPIRATION); | 164 | (GNUNET_CONSTANTS_HELLO_ADDRESS_EXPIRATION); |
165 | |||
165 | GNUNET_free (our_hello); | 166 | GNUNET_free (our_hello); |
166 | our_hello = GNUNET_HELLO_create (&GST_my_public_key, &address_generator, &gc); | 167 | our_hello = GNUNET_HELLO_create (&GST_my_public_key, &address_generator, &gc); |
168 | GNUNET_assert (NULL != our_hello); | ||
169 | |||
167 | #if DEBUG_TRANSPORT | 170 | #if DEBUG_TRANSPORT |
168 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, | 171 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, |
169 | "Refreshed my `%s', new size is %d\n", "HELLO", | 172 | "Refreshed my `%s', new size is %d\n", "HELLO", |
170 | GNUNET_HELLO_size (our_hello)); | 173 | GNUNET_HELLO_size (our_hello)); |
171 | #endif | 174 | #endif |
175 | |||
172 | GNUNET_STATISTICS_update (GST_stats, gettext_noop ("# refreshed my HELLO"), 1, | 176 | GNUNET_STATISTICS_update (GST_stats, gettext_noop ("# refreshed my HELLO"), 1, |
173 | GNUNET_NO); | 177 | GNUNET_NO); |
174 | if (NULL != hello_cb) | 178 | if (NULL != hello_cb) |
@@ -206,6 +210,7 @@ GST_hello_start (GST_HelloCallback cb, void *cb_cls) | |||
206 | hello_cb = cb; | 210 | hello_cb = cb; |
207 | hello_cb_cls = cb_cls; | 211 | hello_cb_cls = cb_cls; |
208 | our_hello = GNUNET_HELLO_create (&GST_my_public_key, NULL, NULL); | 212 | our_hello = GNUNET_HELLO_create (&GST_my_public_key, NULL, NULL); |
213 | GNUNET_assert (NULL != our_hello); | ||
209 | refresh_hello (); | 214 | refresh_hello (); |
210 | } | 215 | } |
211 | 216 | ||