From: Martin Schanzenbach Date: Mon, 11 Jun 2012 10:21:27 +0000 (+0000) Subject: -zkey re X-Git-Tag: initial-import-from-subversion-38251~13160 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=873e2c154f3154a181bbc433475ed97999463aea;p=oweals%2Fgnunet.git -zkey re --- diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c index 2fef34343..b4ad6cb3d 100644 --- a/src/gns/gnunet-gns-proxy.c +++ b/src/gns/gnunet-gns-proxy.c @@ -43,6 +43,7 @@ /* regexp */ #define RE_DOTPLUS "pp_buf, 0, sizeof(ctask->pp_buf)); - memcpy (ctask->pp_buf, hostptr, (m[1].rm_eo-m[1].rm_so)); + + /* If .+ extend with authority */ + if (0 == strcmp (ctask->buffer_ptr+m[1].rm_eo, "+")) + { + memcpy (ctask->pp_buf, hostptr, (m[1].rm_eo-m[1].rm_so)); + strcpy ( ctask->pp_buf+strlen(ctask->pp_buf), + ctask->authority); + } + /* If .zkey simply copy the name */ + else if (0 == strcmp (ctask->buffer_ptr+m[1].rm_eo, "zkey", 4)) + { + memcpy (ctask->pp_buf, hostptr, (m[1].rm_eo-m[1].rm_so+4)); + } ctask->is_postprocessing = GNUNET_YES; ctask->pp_finished = GNUNET_NO; + + GNUNET_GNS_shorten (gns_handle, + ctask->pp_buf, + &process_shorten, + ctask); //postprocess_name(ctask, NULL); - ctask->pp_task = GNUNET_SCHEDULER_add_now (&postprocess_name, ctask); + //ctask->pp_task = GNUNET_SCHEDULER_add_now (&postprocess_name, ctask); return 0; }