From 6c56b5301f86d81bd7e77ff2adeafb8ca36fcddc Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 25 Mar 2007 08:16:16 +0000 Subject: - Daniel Johnson fixed multi code to traverse the easy handle list properly. A left-over bug from the February 21 fix. --- CHANGES | 4 ++++ lib/multi.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 38e9a6ec8..58009ebfd 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,10 @@ Changelog +Daniel S (25 March 2007) +- Daniel Johnson fixed multi code to traverse the easy handle list properly. + A left-over bug from the February 21 fix. + Dan F (23 March 2007) - Added --pubkey option to curl and made --key also work for SCP/SFTP, plus made --pass work on an SSH private key as well. diff --git a/lib/multi.c b/lib/multi.c index 3cf3dd3a7..2a4f1a16c 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -1488,7 +1488,7 @@ CURLMsg *curl_multi_info_read(CURLM *multi_handle, int *msgs_in_queue) return NULL; /* no messages left to return */ easy=multi->easy.next; - while(easy) { + while(easy != &multi->easy) { if(easy->msg_num) { easy->msg_num--; break; @@ -1999,7 +1999,7 @@ void curl_multi_dump(CURLM *multi_handle) int i; fprintf(stderr, "* Multi status: %d handles, %d alive\n", multi->num_easy, multi->num_alive); - for(easy=multi->easy.next; easy; easy = easy->next) { + for(easy=multi->easy.next; easy != &multi->easy; easy = easy->next) { if(easy->state != CURLM_STATE_COMPLETED) { /* only display handles that are not completed */ fprintf(stderr, "handle %p, state %s, %d sockets\n", -- cgit v1.2.3