cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: Bug in curl_multi_info_read in multi.c?

From: Daniel Johnson <daniel_at_daniel-johnson.org>
Date: Fri, 23 Mar 2007 20:32:59 -0400

On Mar 23, 2007, at 8:19 PM, Daniel Johnson wrote:

> I believe I've found a bug in multi.c. Patch attached.

Heh, I think I found another one. Should've checked closer first.
This patch includes both.

Index: lib/multi.c
===================================================================
RCS file: /cvsroot/curl/curl/lib/multi.c,v
retrieving revision 1.133
diff -u -r1.133 multi.c
--- lib/multi.c 23 Mar 2007 22:25:04 -0000 1.133
+++ lib/multi.c 24 Mar 2007 00:29:53 -0000
@@ -1488,7 +1488,7 @@
        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 @@
    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",
Received on 2007-03-24

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET