aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_plugin_transport.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/test_plugin_transport.c')
-rw-r--r--src/transport/test_plugin_transport.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/transport/test_plugin_transport.c b/src/transport/test_plugin_transport.c
index 60cc3c941..97a88beb5 100644
--- a/src/transport/test_plugin_transport.c
+++ b/src/transport/test_plugin_transport.c
@@ -342,6 +342,7 @@ env_notify_address (void *cls,
342 const char *plugin) 342 const char *plugin)
343{ 343{
344 struct AddressWrapper *w; 344 struct AddressWrapper *w;
345 struct AddressWrapper *wtmp;
345 void *s2a; 346 void *s2a;
346 size_t s2a_len; 347 size_t s2a_len;
347 348
@@ -351,6 +352,16 @@ env_notify_address (void *cls,
351 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 352 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
352 "Adding address of length %u\n", addrlen); 353 "Adding address of length %u\n", addrlen);
353 354
355 for (wtmp = head; NULL != wtmp; wtmp = wtmp->next)
356 {
357 if ((addrlen == wtmp->addrlen) && (0 == memcmp (addr, wtmp->addr, addrlen)))
358 {
359 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
360 "Duplicate address notification .... \n");
361 return;
362 }
363 }
364
354 w = GNUNET_new (struct AddressWrapper); 365 w = GNUNET_new (struct AddressWrapper);
355 w->addr = GNUNET_malloc (addrlen); 366 w->addr = GNUNET_malloc (addrlen);
356 w->addrlen = addrlen; 367 w->addrlen = addrlen;