const char *plugin)
{
struct AddressWrapper *w;
+ struct AddressWrapper *wtmp;
void *s2a;
size_t s2a_len;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Adding address of length %u\n", addrlen);
+ for (wtmp = head; NULL != wtmp; wtmp = wtmp->next)
+ {
+ if ((addrlen == wtmp->addrlen) && (0 == memcmp (addr, wtmp->addr, addrlen)))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Duplicate address notification .... \n");
+ return;
+ }
+ }
+
w = GNUNET_new (struct AddressWrapper);
w->addr = GNUNET_malloc (addrlen);
w->addrlen = addrlen;