-ignore
authorChristian Grothoff <christian@grothoff.org>
Sat, 5 May 2012 15:50:43 +0000 (15:50 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 5 May 2012 15:50:43 +0000 (15:50 +0000)
src/fs/fs_dirmetascan.c
src/fs/gnunet-helper-fs-publish.c

index 4e5354e802c204167321f895d9f63aa1ba30bc00..5001b6a140682913c81500a64ede25d2b22288ab 100644 (file)
@@ -257,6 +257,9 @@ process_helper_msgs (void *cls,
   const char *filename;
   size_t left;
 
+  fprintf (stderr, "DMS parses %u-byte message of type %u\n",
+          (unsigned int) ntohs (msg->size),
+          (unsigned int) ntohs (msg->type));
   left = ntohs (msg->size) - sizeof (struct GNUNET_MessageHeader);
   filename = (const char*) &msg[1];
   switch (ntohs (msg->type))
@@ -325,7 +328,7 @@ process_helper_msgs (void *cls,
                           NULL, GNUNET_SYSERR,
                           GNUNET_FS_DIRSCANNER_ALL_COUNTED);
     ds->pos = ds->toplevel;
-    if (ds->pos->is_directory == GNUNET_YES)
+    if (GNUNET_YES == ds->pos->is_directory)
       ds->pos = advance (ds->pos);
     return;
   case GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_META_DATA:
index b96559cd14d62fdede6e84b0c8aa63d256eccecb..1bcfb37fcbbbfcdbb9c97aa593e020b71dbee4e8 100644 (file)
@@ -186,6 +186,9 @@ write_message (uint16_t message_type,
 {
   struct GNUNET_MessageHeader hdr;
 
+  fprintf (stderr, "Helper sends %u-byte message of type %u\n",
+          (unsigned int) (sizeof (struct GNUNET_MessageHeader) + data_length),
+          (unsigned int) message_type);
   hdr.type = htons (message_type);
   hdr.size = htons (sizeof (struct GNUNET_MessageHeader) + data_length);
   if ( (GNUNET_OK !=
@@ -338,7 +341,7 @@ extract_files (struct ScanTreeNode *item)
   ssize_t size;
   size_t slen;
 
-  if (item->is_directory == GNUNET_YES)
+  if (GNUNET_YES == item->is_directory)
   {
     /* for directories, we simply only descent, no extraction, no
        progress reporting */