From c8549a759d6b78255a194287bc146593d5df552c Mon Sep 17 00:00:00 2001 From: Martin Schanzenbach Date: Mon, 11 Jun 2012 11:43:27 +0000 Subject: [PATCH] -zkey, fix gnutls import --- src/gns/gnunet-gns-proxy.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c index ad2d3a969..4416425a3 100644 --- a/src/gns/gnunet-gns-proxy.c +++ b/src/gns/gnunet-gns-proxy.c @@ -42,8 +42,8 @@ #define HTML_HDR_CONTENT "Content-Type: text/html\r\n" /* regexp */ -#define RE_DOTPLUS "pp_buf, short_name); - sprintf (tmp, "pp_buf, tmp); ctask->pp_finished = GNUNET_YES; @@ -582,7 +582,12 @@ mhd_content_cb (void *cls, nomatch = regexec ( &re_dotplus, ctask->buffer_ptr, RE_N_MATCHES, m, 0); - if (!nomatch) + if (nomatch) + { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "MHD RE: No match\n"); + } + else { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "MHD RE: Match\n"); @@ -638,8 +643,10 @@ mhd_content_cb (void *cls, memset (ctask->pp_buf, 0, sizeof(ctask->pp_buf)); /* If .+ extend with authority */ - if (0 == strcmp (ctask->buffer_ptr+m[1].rm_eo, "+")) + if (*(ctask->buffer_ptr+m[1].rm_eo) == '+') { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Links is .+\n"); memcpy (ctask->pp_buf, hostptr, (m[1].rm_eo-m[1].rm_so)); strcpy ( ctask->pp_buf+strlen(ctask->pp_buf), ctask->authority); @@ -647,6 +654,8 @@ mhd_content_cb (void *cls, /* If .zkey simply copy the name */ else { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Link is zkey\n"); memcpy (ctask->pp_buf, hostptr, (m[1].rm_eo-m[1].rm_so + strlen (GNUNET_GNS_TLD_ZKEY))); } @@ -949,6 +958,10 @@ process_leho_lookup (void *cls, strcpy (ctask->leho, ""); + if (rd_count == 0) + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "No LEHO present!\n"); + for (i=0; i