X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fgns%2Fgnunet-gns-proxy.c;h=cdc18e3f6b156ca8bfab88ffcf423f4ce292c10a;hb=bcbd694ad35e182e5a1486b545ea0706082ee94a;hp=3f28f420a7982d2a953112e766a0ff4bdafb25e7;hpb=4cd2beb85e6a8bc45d861b9c2a5acc19cf9fbd07;p=oweals%2Fgnunet.git diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c index 3f28f420a..cdc18e3f6 100644 --- a/src/gns/gnunet-gns-proxy.c +++ b/src/gns/gnunet-gns-proxy.c @@ -587,6 +587,7 @@ con_post_data_iter (void *cls, memcpy (new_value, pdata->value, pdata->total_bytes); memcpy (new_value+off, data, size); GNUNET_free (pdata->value); + pdata->value = new_value; pdata->total_bytes += size; return MHD_YES; @@ -1040,7 +1041,7 @@ mhd_content_free (void *cls, if (NULL != ctask->post_handler) MHD_destroy_post_processor (ctask->post_handler); - for (pdata = ctask->upload_data_head;; NULL != pdata; pdata = ctask->upload_data_head) + for (pdata = ctask->upload_data_head; NULL != pdata; pdata = ctask->upload_data_head) { GNUNET_CONTAINER_DLL_remove (ctask->upload_data_head, ctask->upload_data_tail, @@ -2014,8 +2015,8 @@ create_response (void *cls, curl_easy_setopt (ctask->curl, CURLOPT_TIMEOUT, 600L); /* Add GNS header */ - //ctask->headers = curl_slist_append (ctask->headers, - // "GNS: YES"); + ctask->headers = curl_slist_append (ctask->headers, + "GNS: YES"); ctask->accepted = GNUNET_YES; ctask->download_in_progress = GNUNET_YES; ctask->buf_status = BUF_WAIT_FOR_CURL; @@ -2109,11 +2110,11 @@ create_response (void *cls, { if (GNUNET_YES == ctask->is_httppost) { - i = 0; for (upload_data_iter = ctask->upload_data_head; NULL != upload_data_iter; upload_data_iter = upload_data_iter->next) { + i = 0; if (NULL != upload_data_iter->filename) { forms[i].option = CURLFORM_FILENAME;