gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r13674 - gnunet/src/core


From: gnunet
Subject: [GNUnet-SVN] r13674 - gnunet/src/core
Date: Sun, 14 Nov 2010 07:08:56 +0100

Author: grothoff
Date: 2010-11-14 07:08:56 +0100 (Sun, 14 Nov 2010)
New Revision: 13674

Modified:
   gnunet/src/core/gnunet-service-core.c
Log:
hxing

Modified: gnunet/src/core/gnunet-service-core.c
===================================================================
--- gnunet/src/core/gnunet-service-core.c       2010-11-13 22:38:47 UTC (rev 
13673)
+++ gnunet/src/core/gnunet-service-core.c       2010-11-14 06:08:56 UTC (rev 
13674)
@@ -1153,7 +1153,11 @@
   while (c != NULL)
     {
       if (client == c->client_handle)
-        break;
+        {
+          GNUNET_break (0);
+          GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
+          return;
+        }
       c = c->next;
     }
   msize = ntohs (message->size);
@@ -1167,19 +1171,16 @@
   im = (const struct InitMessage *) message;
   types = (const uint16_t *) &im[1];
   msize -= sizeof (struct InitMessage);
-  if (c == NULL)
-    {
-      c = GNUNET_malloc (sizeof (struct Client) + msize);
-      c->client_handle = client;
-      c->next = clients;
-      clients = c;
-      c->tcnt = msize / sizeof (uint16_t);
-      c->types = (const uint16_t *) &c[1];    
-      wtypes = (uint16_t *) &c[1];
-      for (i=0;i<c->tcnt;i++)
-       wtypes[i] = ntohs (types[i]);
-      c->options = ntohl (im->options);
-    }
+  c = GNUNET_malloc (sizeof (struct Client) + msize);
+  c->client_handle = client;
+  c->next = clients;
+  clients = c;
+  c->tcnt = msize / sizeof (uint16_t);
+  c->types = (const uint16_t *) &c[1];
+  wtypes = (uint16_t *) &c[1];
+  for (i=0;i<c->tcnt;i++)
+    wtypes[i] = ntohs (types[i]);
+  c->options = ntohl (im->options);
 #if DEBUG_CORE_CLIENT
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
              "Client %p is interested in %u message types\n",




reply via email to

[Prev in Thread] Current Thread [Next in Thread]