-ignore
[oweals/gnunet.git] / src / gns / gnunet-gns-proxy.c
index ac990eb8380b1d0f0f8cb64fe2cc06cd45a1f495..cdc18e3f6b156ca8bfab88ffcf423f4ce292c10a 100644 (file)
@@ -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,
@@ -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;