cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_multi_perform generating same responses for all easy_handles inserted

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 1 May 2011 23:16:33 +0200 (CEST)

On Mon, 2 May 2011, Pa1 wrote:

> Curl version I'm using is 7.15.1

1. That libcurl version is ancient, please upgrade! It contains 5 security
flaws, and we've done 31 releases with 700+ bugfixes in the more than 5 years
since it was relased...

2. You didn't show us a complete program so its hard to tell if you've used
libcurl correctly or not. I can't recall us ever having had such a bug so I
actually believe this issue is in your code.

3. This code snippet is seriously wrong:

> do {
> performRet = curl_multi_perform(mcurl, &stillRunning);
> }while(performRet == CURLM_CALL_MULTI_PERFORM || oldStillRunning ==
> stillRunning);

That expression after the || is completely wrong and will cause your program
to busy-loop like crazy. No example or docs should lead you to do such a funny
thing.

4. All those C++ism in such a simple and small piece of code made my head
hurt. (That might not be your fault though...)

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-05-01