diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-06-18 17:10:22 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-06-18 17:10:22 +0200 |
commit | 9d0fb05e46e011ecff520eda6d67800f96e66491 (patch) | |
tree | 6e04d654196fbfd4778d466bd696baac2e7b0b0d /src/curl | |
parent | 6e9bb3405a731442274c6c2fe99983f1d413b1f9 (diff) | |
download | gnunet-9d0fb05e46e011ecff520eda6d67800f96e66491.tar.gz gnunet-9d0fb05e46e011ecff520eda6d67800f96e66491.zip |
minimize scopes
Diffstat (limited to 'src/curl')
-rw-r--r-- | src/curl/curl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/curl/curl.c b/src/curl/curl.c index 020cdc24f..a45d0a154 100644 --- a/src/curl/curl.c +++ b/src/curl/curl.c | |||
@@ -430,7 +430,7 @@ GNUNET_CURL_job_cancel (struct GNUNET_CURL_Job *job) | |||
430 | * the JSON we received was malformed). | 430 | * the JSON we received was malformed). |
431 | * @return NULL if downloading a JSON reply failed. | 431 | * @return NULL if downloading a JSON reply failed. |
432 | */ | 432 | */ |
433 | void * | 433 | static void * |
434 | download_get_result (struct GNUNET_CURL_DownloadBuffer *db, | 434 | download_get_result (struct GNUNET_CURL_DownloadBuffer *db, |
435 | CURL *eh, | 435 | CURL *eh, |
436 | long *response_code) | 436 | long *response_code) |
@@ -523,15 +523,16 @@ GNUNET_CURL_perform2 (struct GNUNET_CURL_Context *ctx, | |||
523 | GNUNET_CURL_ResponseCleaner rc) | 523 | GNUNET_CURL_ResponseCleaner rc) |
524 | { | 524 | { |
525 | CURLMsg *cmsg; | 525 | CURLMsg *cmsg; |
526 | struct GNUNET_CURL_Job *job; | ||
527 | int n_running; | 526 | int n_running; |
528 | int n_completed; | 527 | int n_completed; |
529 | long response_code; | ||
530 | void *response; | ||
531 | 528 | ||
532 | (void) curl_multi_perform (ctx->multi, &n_running); | 529 | (void) curl_multi_perform (ctx->multi, &n_running); |
533 | while (NULL != (cmsg = curl_multi_info_read (ctx->multi, &n_completed))) | 530 | while (NULL != (cmsg = curl_multi_info_read (ctx->multi, &n_completed))) |
534 | { | 531 | { |
532 | struct GNUNET_CURL_Job *job; | ||
533 | long response_code; | ||
534 | void *response; | ||
535 | |||
535 | /* Only documented return value is CURLMSG_DONE */ | 536 | /* Only documented return value is CURLMSG_DONE */ |
536 | GNUNET_break (CURLMSG_DONE == cmsg->msg); | 537 | GNUNET_break (CURLMSG_DONE == cmsg->msg); |
537 | GNUNET_assert (CURLE_OK == curl_easy_getinfo (cmsg->easy_handle, | 538 | GNUNET_assert (CURLE_OK == curl_easy_getinfo (cmsg->easy_handle, |
@@ -620,9 +621,8 @@ GNUNET_CURL_perform2 (struct GNUNET_CURL_Context *ctx, | |||
620 | void | 621 | void |
621 | GNUNET_CURL_perform (struct GNUNET_CURL_Context *ctx) | 622 | GNUNET_CURL_perform (struct GNUNET_CURL_Context *ctx) |
622 | { | 623 | { |
623 | |||
624 | GNUNET_CURL_perform2 (ctx, | 624 | GNUNET_CURL_perform2 (ctx, |
625 | download_get_result, | 625 | &download_get_result, |
626 | (GNUNET_CURL_ResponseCleaner) &json_decref); | 626 | (GNUNET_CURL_ResponseCleaner) &json_decref); |
627 | } | 627 | } |
628 | 628 | ||