gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r24057 - in gnunet/src: core gns hostlist transport


From: gnunet
Subject: [GNUnet-SVN] r24057 - in gnunet/src: core gns hostlist transport
Date: Thu, 27 Sep 2012 16:06:37 +0200

Author: grothoff
Date: 2012-09-27 16:06:37 +0200 (Thu, 27 Sep 2012)
New Revision: 24057

Modified:
   gnunet/src/core/gnunet-core.c
   gnunet/src/gns/gnunet-gns-fcfsd.c
   gnunet/src/gns/gnunet-gns-proxy.c
   gnunet/src/hostlist/hostlist-server.c
   gnunet/src/transport/plugin_transport_http_server.c
   gnunet/src/transport/plugin_transport_smtp.c
Log:
-some fixes for monkey

Modified: gnunet/src/core/gnunet-core.c
===================================================================
--- gnunet/src/core/gnunet-core.c       2012-09-27 14:03:38 UTC (rev 24056)
+++ gnunet/src/core/gnunet-core.c       2012-09-27 14:06:37 UTC (rev 24057)
@@ -166,6 +166,9 @@
 run (void *cls, char *const *args, const char *cfgfile,
      const struct GNUNET_CONFIGURATION_Handle *cfg)
 {
+  static const struct GNUNET_CORE_MessageHandler handlers[] = {
+    {NULL, 0, 0}
+  };
   if (args[0] != NULL)
   {
     FPRINTF (stderr, _("Invalid command line argument `%s'\n"), args[0]);
@@ -175,12 +178,7 @@
     GNUNET_CORE_iterate_peers (cfg, &connected_peer_callback, NULL);
   else
   {
-    const static struct GNUNET_CORE_MessageHandler handlers[] = {
-      {NULL, 0, 0}
-    };
-
     memset(&my_id, '\0', sizeof (my_id));
-
     ch = GNUNET_CORE_connect (cfg, NULL,
                               monitor_notify_startup,
                               monitor_notify_connect,

Modified: gnunet/src/gns/gnunet-gns-fcfsd.c
===================================================================
--- gnunet/src/gns/gnunet-gns-fcfsd.c   2012-09-27 14:03:38 UTC (rev 24056)
+++ gnunet/src/gns/gnunet-gns-fcfsd.c   2012-09-27 14:06:37 UTC (rev 24057)
@@ -771,6 +771,9 @@
 }
 
 
+#define UNSIGNED_MHD_LONG_LONG unsigned MHD_LONG_LONG
+
+
 /**
  * Schedule tasks to run MHD server.
  */
@@ -785,7 +788,7 @@
   struct GNUNET_NETWORK_FDSet *wes;
   int max;
   int haveto;
-  unsigned MHD_LONG_LONG timeout;
+  UNSIGNED_MHD_LONG_LONG timeout;
   struct GNUNET_TIME_Relative tv;
 
   FD_ZERO (&rs);

Modified: gnunet/src/gns/gnunet-gns-proxy.c
===================================================================
--- gnunet/src/gns/gnunet-gns-proxy.c   2012-09-27 14:03:38 UTC (rev 24056)
+++ gnunet/src/gns/gnunet-gns-proxy.c   2012-09-27 14:06:37 UTC (rev 24057)
@@ -1074,13 +1074,11 @@
   struct ProxyCurlTask *ctask = cls;
   struct ProxyREMatch *re_match;
   ssize_t copied = 0;
-  long long int bytes_to_copy = ctask->buffer_write_ptr - 
ctask->buffer_read_ptr;
+  size_t bytes_to_copy = ctask->buffer_write_ptr - ctask->buffer_read_ptr;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "MHD: content cb for %s. To copy: %lld\n",
-              ctask->url, bytes_to_copy);
-  GNUNET_assert (bytes_to_copy >= 0);
-
+              "MHD: content cb for %s. To copy: %u\n",
+              ctask->url, (unsigned int) bytes_to_copy);
   if ((GNUNET_YES == ctask->download_is_finished) &&
       (GNUNET_NO == ctask->download_error) &&
       (0 == bytes_to_copy))
@@ -1117,15 +1115,13 @@
                 "MHD: Processing PP %s\n",
                 re_match->hostname);
     bytes_to_copy = re_match->start - ctask->buffer_read_ptr;
-    GNUNET_assert (bytes_to_copy >= 0);
-
     if (bytes_to_copy+copied > max)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-             "MHD: buffer in response too small for %d. Using available space 
(%d). (%s)\n",
-             bytes_to_copy,
-             max,
-             ctask->url);
+                 "MHD: buffer in response too small for %u. Using available 
space (%d). (%s)\n",
+                 (unsigned int) bytes_to_copy,
+                 max,
+                 ctask->url);
       memcpy (buf+copied, ctask->buffer_read_ptr, max-copied);
       ctask->buffer_read_ptr += max-copied;
       copied = max;
@@ -1135,8 +1131,8 @@
     }
 
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                "MHD: copying %d bytes to mhd response at offset %d\n",
-                bytes_to_copy, ctask->buffer_read_ptr);
+                "MHD: copying %u bytes to mhd response at offset %d\n",
+                (unsigned int) bytes_to_copy, ctask->buffer_read_ptr);
     memcpy (buf+copied, ctask->buffer_read_ptr, bytes_to_copy);
     copied += bytes_to_copy;
 
@@ -1178,12 +1174,10 @@
   bytes_to_copy = ctask->buffer_write_ptr - ctask->buffer_read_ptr;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "MHD: copied: %d left: %d, space left in buf: %d\n",
+              "MHD: copied: %d left: %u, space left in buf: %d\n",
               copied,
-              bytes_to_copy, (int) (max - copied));
+              (unsigned int) bytes_to_copy, (int) (max - copied));
   
-  GNUNET_assert (0 <= bytes_to_copy);
-
   if (GNUNET_NO == ctask->download_is_finished)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,

Modified: gnunet/src/hostlist/hostlist-server.c
===================================================================
--- gnunet/src/hostlist/hostlist-server.c       2012-09-27 14:03:38 UTC (rev 
24056)
+++ gnunet/src/hostlist/hostlist-server.c       2012-09-27 14:06:37 UTC (rev 
24057)
@@ -465,6 +465,7 @@
     hostlist_task_v6 = prepare_daemon (daemon_handle);
 }
 
+#define UNSIGNED_MHD_LONG_LONG unsigned MHD_LONG_LONG
 
 /**
  * Function that queries MHD's select sets and
@@ -481,7 +482,7 @@
   struct GNUNET_NETWORK_FDSet *wws;
   struct GNUNET_NETWORK_FDSet *wes;
   int max;
-  unsigned MHD_LONG_LONG timeout;
+  UNSIGNED_MHD_LONG_LONG timeout;
   int haveto;
   struct GNUNET_TIME_Relative tv;
 

Modified: gnunet/src/transport/plugin_transport_http_server.c
===================================================================
--- gnunet/src/transport/plugin_transport_http_server.c 2012-09-27 14:03:38 UTC 
(rev 24056)
+++ gnunet/src/transport/plugin_transport_http_server.c 2012-09-27 14:06:37 UTC 
(rev 24057)
@@ -1633,6 +1633,8 @@
 }
 
 
+#define UNSIGNED_MHD_LONG_LONG unsigned MHD_LONG_LONG
+
 /**
  * Function that queries MHD's select sets and
  * starts the task waiting for them.
@@ -1654,7 +1656,7 @@
   struct GNUNET_NETWORK_FDSet *wws;
   struct GNUNET_NETWORK_FDSet *wes;
   int max;
-  unsigned MHD_LONG_LONG timeout;
+  UNSIGNED_MHD_LONG_LONG timeout;
   static unsigned long long last_timeout = 0;
   int haveto;
 

Modified: gnunet/src/transport/plugin_transport_smtp.c
===================================================================
--- gnunet/src/transport/plugin_transport_smtp.c        2012-09-27 14:03:38 UTC 
(rev 24056)
+++ gnunet/src/transport/plugin_transport_smtp.c        2012-09-27 14:06:37 UTC 
(rev 24057)
@@ -813,9 +813,7 @@
     stat_bytesDropped =
         stats->create (gettext_noop ("# bytes dropped by SMTP (outgoing)"));
   }
-  GNUNET_GC_get_configuration_value_filename (coreAPI->cfg, "SMTP", "PIPE",
-                                              
GNUNET_DEFAULT_DAEMON_VAR_DIRECTORY
-                                              "/smtp-pipe", &pipename);
+  GNUNET_GC_get_configuration_value_filename (coreAPI->cfg, "SMTP", "PIPE", 
&pipename);
   UNLINK (pipename);
   if (0 != mkfifo (pipename, S_IWUSR | S_IRUSR | S_IWGRP | S_IWOTH))
   {




reply via email to

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