- fixed regex offset, doc
authorBart Polot <bart@net.in.tum.de>
Fri, 26 Oct 2012 18:30:39 +0000 (18:30 +0000)
committerBart Polot <bart@net.in.tum.de>
Fri, 26 Oct 2012 18:30:39 +0000 (18:30 +0000)
src/mesh/gnunet-service-mesh.c
src/mesh/mesh_api.c

index 5cc0d8c0dd34d86401e244e5ceaab537d7263171..1030fec59a4cb3a6ff58151a9acf1aa555fbad90 100644 (file)
@@ -6733,10 +6733,13 @@ handle_local_announce_regex (void *cls, struct GNUNET_SERVER_Client *client,
   msg = (struct GNUNET_MESH_RegexAnnounce *) message;
   len = ntohs (message->size) - sizeof(struct GNUNET_MESH_RegexAnnounce);
   regex = GNUNET_malloc (len + 1);
-  memcpy (regex, &message[1], len);
+  memcpy (regex, &msg[1], len);
   regex[len] = '\0';
   rd.regex = regex;
   rd.compression = ntohs (msg->compression_characters);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "  length %u\n", len);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "  regex %s\n", regex);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "  cm %u\n", ntohs(rd.compression));
   GNUNET_array_append (c->regexes, c->n_regex, rd);
   if (GNUNET_SCHEDULER_NO_TASK == c->regex_announce_task)
   {
index 77ae1217f9a2a99987ed68b071aeb13624308739..bef8ecae3e574b4237969e90f2a0af53d532c013 100644 (file)
@@ -1152,7 +1152,7 @@ process_incoming_data (struct GNUNET_MESH_Handle *h,
   LOG (GNUNET_ERROR_TYPE_DEBUG, "  pid %u\n", pid);
   if (NULL == t)
   {
-    /* Tunnel was ignored, probably service didn't get it yet */
+    /* Tunnel was ignored/destroyed, probably service didn't get it yet */
     LOG (GNUNET_ERROR_TYPE_DEBUG, "  ignored!\n");
     return GNUNET_YES;
   }