aboutsummaryrefslogtreecommitdiff
path: root/src/gns/gns_api.c
diff options
context:
space:
mode:
authorschanzen <schanzen@140774ce-b5e7-0310-ab8b-a85725594a96>2012-03-08 10:00:57 +0000
committerschanzen <schanzen@140774ce-b5e7-0310-ab8b-a85725594a96>2012-03-08 10:00:57 +0000
commit853b85b6ee3b1f5ab8b8a9d8dec0ef192e77cd0a (patch)
tree7d38042794ccda155446ff5cea94fb2f02d832ba /src/gns/gns_api.c
parent9980afd2af6df94fb1be374e54d1f597a8a3dfab (diff)
-new shorten test, fixes
git-svn-id: https://gnunet.org/svn/gnunet@20364 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/gns/gns_api.c')
-rw-r--r--src/gns/gns_api.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gns/gns_api.c b/src/gns/gns_api.c
index 104423c321..eaae4955f3 100644
--- a/src/gns/gns_api.c
+++ b/src/gns/gns_api.c
@@ -508,8 +508,8 @@ process_shorten_reply (void *cls, const GNUNET_HashCode * key, void *value)
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Received reply for `%s' from GNS service %p\n",
- name, shorten_handle->gns_handle);
+ "Received reply for `%s' from GNS service\n",
+ name);
if (gns_msg->unique_id != shorten_handle->unique_id)
{
@@ -780,9 +780,10 @@ GNUNET_GNS_shorten (struct GNUNET_GNS_Handle *handle,
return NULL;
}
- msize = sizeof (struct GNUNET_GNS_ClientShortenMessage) + strlen(name);
+ msize = sizeof (struct GNUNET_GNS_ClientShortenMessage) + strlen(name) +1;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Trying to shorten %s in GNS\n", name);
pending = GNUNET_malloc (sizeof (struct PendingMessage) + msize);
+ memset(pending, 0, (sizeof (struct PendingMessage) + msize));
shorten_msg = (struct GNUNET_GNS_ClientShortenMessage *) &pending[1];
pending->msg = &shorten_msg->header;
pending->handle = handle;