-GArik: fix typo
[oweals/gnunet.git] / src / util / server_nc.c
index a36fa0c505a21d15881e56de2dd4e7929b01aabd..08ffd4b0c6be4e5d542ce0f2c7a2c690dcf2c407 100644 (file)
@@ -262,6 +262,9 @@ GNUNET_SERVER_notification_context_add (struct GNUNET_SERVER_NotificationContext
 {
   struct ClientList *cl;
 
+  for (cl = nc->clients; NULL != cl; cl = cl->next)
+    if (cl->client == client)
+      return; /* already present */    
   cl = GNUNET_malloc (sizeof (struct ClientList));
   cl->next = nc->clients;
   cl->nc = nc;