fixes
authorBart Polot <bart@net.in.tum.de>
Wed, 3 Aug 2011 11:42:08 +0000 (11:42 +0000)
committerBart Polot <bart@net.in.tum.de>
Wed, 3 Aug 2011 11:42:08 +0000 (11:42 +0000)
src/mesh/gnunet-service-mesh.c
src/mesh/test_mesh_small.c

index 53c38ce5e62a56038a1d62616ebb8a9ce17010ca..05baf4789f612c92b5649b39b2e3e4b06f1a9467 100644 (file)
@@ -762,7 +762,7 @@ send_core_data_to_origin (void *cls, size_t size, void *buf)
 
     GNUNET_assert(NULL != info);
     total_size = sizeof(struct GNUNET_MESH_DataMessageToOrigin) + info->size;
-    GNUNET_assert(total_size < (uint16_t) -1); /* FIXME */
+    GNUNET_assert(total_size < 65536); /* UNIT16_MAX */
 
     if (total_size > size) {
         GNUNET_log(GNUNET_ERROR_TYPE_WARNING,
@@ -805,7 +805,7 @@ send_core_data_raw (void *cls, size_t size, void *buf)
                    "not enough buffer to send data futher\n");
         return 0;
     }
-    memcpy(msg, buf, total_size);
+    memcpy(buf, msg, total_size);
     return total_size;
 }
 
index 3c0b2eb674e162ef7a393d1ebf3f8da34d4225e6..b5c3939f82a30868ba520db828bc15da1e8ea404 100644 (file)
@@ -581,7 +581,7 @@ run (void *cls,
                                     GNUNET_DISK_PERM_USER_WRITE);
   if (data_file == NULL)
     GNUNET_log(GNUNET_ERROR_TYPE_WARNING, 
-              "Failed to open %s for output!\n", 
+              "Failed to open %s for output!\n",
               data_filename);
   GNUNET_free(data_filename);
 
@@ -651,4 +651,4 @@ main (int argc, char *argv[])
   return ok;
 }
 
-/* end of nse-profiler.c */
+/* end of test_mesh_small.c */