diff options
author | Noah Sanci <nsanci@redhat.com> | 2021-09-17 10:45:39 -0400 |
---|---|---|
committer | Noah Sanci <nsanci@redhat.com> | 2021-09-17 10:51:06 -0400 |
commit | 1a9e99cbcac3ad5f6e1f7407f6b0e812a73c888e (patch) | |
tree | 9427d0aa919d7f7e1c1b2c5a13e0adcbf8e857be | |
parent | ff5056c7d78b925fbd49997dc88183f6c859ac7f (diff) | |
download | elfutils-nsanci/curlfix.tar.gz |
debuginfod: Query debuginfod servers before printing response headersnsanci/curlfix
While checking PR27277 on some buildbots, greping would fail in
run-debuginfod-response-headers.sh. This was because querying the
debuginfod server occurs after checking if the responseh headers had
arrived, leaving the possibility to leave the querying loop before
outputting the headers which caused the grep failure. Querying now
occurs before checking if response headers have arrived, so that they
will certainly be printed and grep will find them.
Signed-off-by: Noah Sanci <nsanci@redhat.com>
-rw-r--r-- | debuginfod/ChangeLog | 5 | ||||
-rw-r--r-- | debuginfod/debuginfod-client.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog index e2e6c5f8..c2bfce98 100644 --- a/debuginfod/ChangeLog +++ b/debuginfod/ChangeLog @@ -1,3 +1,8 @@ +2021-09-17 Noah Sanci <nsanci@redhat.com> + + * debuginfod-client.c (debuginfod_query_server): curl_multi_perform + now occurs before checking if response headers have arrived. + 2021-09-14 Frank Ch. Eigler <fche@redhat.com> PRPR28339 diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c index 4d5dbd95..88e45567 100644 --- a/debuginfod/debuginfod-client.c +++ b/debuginfod/debuginfod-client.c @@ -1046,6 +1046,7 @@ debuginfod_query_server (debuginfod_client *c, } /* Wait 1 second, the minimum DEBUGINFOD_TIMEOUT. */ curl_multi_wait(curlm, NULL, 0, 1000, NULL); + CURLMcode curlm_res = curl_multi_perform(curlm, &still_running); /* If the target file has been found, abort the other queries. */ if (target_handle != NULL) @@ -1077,7 +1078,6 @@ debuginfod_query_server (debuginfod_client *c, verbose_reported = true; } - CURLMcode curlm_res = curl_multi_perform(curlm, &still_running); if (curlm_res != CURLM_OK) { switch (curlm_res) |