-more rsa refactoring
[oweals/gnunet.git] / src / gns / gnunet-gns-proxy.c
index 45e36eae5619c100f3602df49ce733a549a1cb48..9c8fde8615f6ec7935402a59c04ef47c495f5e21 100644 (file)
@@ -30,7 +30,7 @@
 #include "gns_proxy_proto.h"
 #include "gns.h"
 
-#define HAVE_MHD_NO_LISTEN_SOCKET MHD_VERSION >= 0x00091401
+#define HAVE_MHD_NO_LISTEN_SOCKET (MHD_VERSION >= 0x00091401)
 
 #define GNUNET_GNS_PROXY_PORT 7777
 #define MHD_MAX_CONNECTIONS 300
@@ -1189,11 +1189,7 @@ mhd_content_cb (void *cls,
   }
   
   if (bytes_to_copy + copied > max)
-    bytes_to_copy = max-copied;
-
-  if (0 > bytes_to_copy)
-    bytes_to_copy = 0;
-  
+    bytes_to_copy = max - copied;
   memcpy (buf+copied, ctask->buffer_read_ptr, bytes_to_copy);
   ctask->buffer_read_ptr += bytes_to_copy;
   copied += bytes_to_copy;
@@ -2741,7 +2737,7 @@ add_handle_to_ssl_mhd (struct GNUNET_NETWORK_Handle *h, const char* domain)
                                   MHD_OPTION_URI_LOG_CALLBACK, &mhd_log_callback,
                                   NULL,
                                   MHD_OPTION_END);
-
+#endif
     GNUNET_assert (hd->daemon != NULL);
     hd->httpd_task = GNUNET_SCHEDULER_NO_TASK;