gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-twister] branch master updated: minimize scopes


From: gnunet
Subject: [GNUnet-SVN] [taler-twister] branch master updated: minimize scopes
Date: Tue, 18 Jun 2019 17:10:38 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository twister.

The following commit(s) were added to refs/heads/master by this push:
     new cd20202  minimize scopes
cd20202 is described below

commit cd20202b450fa714275ee597c4d71cd8cb0c207f
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Jun 18 17:10:33 2019 +0200

    minimize scopes
---
 src/twister/taler-twister-service.c | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/src/twister/taler-twister-service.c 
b/src/twister/taler-twister-service.c
index 918dd5d..250ea53 100644
--- a/src/twister/taler-twister-service.c
+++ b/src/twister/taler-twister-service.c
@@ -1506,10 +1506,10 @@ create_response (void *cls,
       GNUNET_assert (*upload_data_size + hr->io_len > hr->io_len);
 
       GNUNET_array_grow (hr->io_buf,
-                        hr->io_size,
-                        GNUNET_MAX
-                           (hr->io_size * 2 + 1024,
-                           *upload_data_size + hr->io_len));
+                         hr->io_size,
+                         GNUNET_MAX
+                         (hr->io_size * 2 + 1024,
+                          *upload_data_size + hr->io_len));
     }
 
     /* Finally copy upload data.  */
@@ -1532,9 +1532,10 @@ create_response (void *cls,
                 "Finished processing UPLOAD\n");
     if (0 != hr->io_len)
     {
+      const char *ce;
+
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                   "Attempting to decompress\n");
-      const char *ce;
       ce = MHD_lookup_connection_value
         (con,
          MHD_HEADER_KIND,
@@ -1551,6 +1552,7 @@ create_response (void *cls,
       if ((NULL != ce) && (0 == strcmp ("application/json", ce)))
       {
         json_error_t error;
+
         hr->json = json_loadb (hr->io_buf,
                                hr->io_len,
                                JSON_DECODE_ANY,
@@ -1962,13 +1964,15 @@ mhd_completed_cb (void *cls,
                 "Resetting cURL handle\n");
     curl_multi_remove_handle (curl_multi,
                               hr->curl);
-    curl_slist_free_all (hr->headers);
-    hr->headers = NULL;
     curl_easy_cleanup (hr->curl);
     hr->curl = NULL;
     hr->io_len = 0;
   }
-
+  if (NULL != hr->headers)
+  {
+    curl_slist_free_all (hr->headers);
+    hr->headers = NULL;
+  }
   if ( (NULL != hr->response) &&
        (curl_failure_response != hr->response) )
     /* Destroy non-error responses... (?) */
@@ -2211,6 +2215,7 @@ do_shutdown (void *cls)
   target_server_base_url = NULL;
 }
 
+
 /**
  * Connect to a unix domain socket.
  *

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]