gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r10875 - gnunet/src/hostlist


From: gnunet
Subject: [GNUnet-SVN] r10875 - gnunet/src/hostlist
Date: Mon, 12 Apr 2010 13:35:33 +0200

Author: grothoff
Date: 2010-04-12 13:35:33 +0200 (Mon, 12 Apr 2010)
New Revision: 10875

Modified:
   gnunet/src/hostlist/hostlist-client.c
   gnunet/src/hostlist/hostlist-server.c
Log:
fix

Modified: gnunet/src/hostlist/hostlist-client.c
===================================================================
--- gnunet/src/hostlist/hostlist-client.c       2010-04-12 11:20:04 UTC (rev 
10874)
+++ gnunet/src/hostlist/hostlist-client.c       2010-04-12 11:35:33 UTC (rev 
10875)
@@ -151,11 +151,10 @@
   while ( (left > 0) ||
          (download_pos > 0) )
     {
-      cpy = GNUNET_MIN (total, GNUNET_SERVER_MAX_MESSAGE_SIZE - download_pos);
-      GNUNET_assert (cpy > 0);
+      cpy = GNUNET_MIN (left, GNUNET_SERVER_MAX_MESSAGE_SIZE - download_pos);
       memcpy (&download_buffer[download_pos],
              cbuf,
-             cpy);
+             cpy);      
       cbuf += cpy;
       download_pos += cpy;
       left -= cpy;

Modified: gnunet/src/hostlist/hostlist-server.c
===================================================================
--- gnunet/src/hostlist/hostlist-server.c       2010-04-12 11:20:04 UTC (rev 
10874)
+++ gnunet/src/hostlist/hostlist-server.c       2010-04-12 11:35:33 UTC (rev 
10875)
@@ -206,6 +206,8 @@
       finish_response (results);
       return;
     }
+  if (hello == NULL)
+    return;
   has_addr = GNUNET_NO;
   GNUNET_HELLO_iterate_addresses (hello,
                                  GNUNET_NO,





reply via email to

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