-remove debug message
[oweals/gnunet.git] / src / gns / gnunet-gns-proxy.c
index 5b8348d43363c45fc39f4308a23ffe18fadde39d..eb6c6852ecaaa4cea1526c505f040a60f867d7aa 100644 (file)
@@ -43,7 +43,7 @@
 #include "gnunet_gns_service.h"
 #include "gnunet_identity_service.h"
 #include "gns.h"
-
+#include "gnunet_mhd_compat.h"
 
 /**
  * Default Socks5 listen port.
@@ -1827,7 +1827,7 @@ con_val_iter (void *cls,
  *         #MHD_NO if the socket must be closed due to a serious
  *         error while handling the request
  */
-static int
+static MHD_RESULT
 create_response (void *cls,
                  struct MHD_Connection *con,
                  const char *url,
@@ -3012,6 +3012,9 @@ signal_socks_failure (struct Socks5Request *s5r,
 {
   struct Socks5ServerResponseMessage *s_resp;
 
+  GNUNET_break (0 == s5r->wbuf_len); /* Should happen first in any transmission, right? */
+  GNUNET_assert (SOCKS_BUFFERSIZE - s5r->wbuf_len >=
+                 sizeof(struct Socks5ServerResponseMessage));
   s_resp = (struct Socks5ServerResponseMessage *) &s5r->wbuf[s5r->wbuf_len];
   memset (s_resp, 0, sizeof(struct Socks5ServerResponseMessage));
   s_resp->version = SOCKS_VERSION_5;
@@ -3375,7 +3378,7 @@ do_s5r_read (void *cls)
         s5r->gns_lookup = GNUNET_GNS_lookup_with_tld (gns_handle,
                                                       s5r->domain,
                                                       GNUNET_DNSPARSER_TYPE_A,
-                                                      GNUNET_NO /* only cached */,
+                                                      GNUNET_GNS_LO_LOCAL_MASTER /* only cached */,
                                                       &handle_gns_result,
                                                       s5r);
         break;