aboutsummaryrefslogtreecommitdiff
path: root/lib/multi.c
AgeCommit message (Collapse)Author
2009-05-08- Constantine Sapuntzakis fixed bug report #2784055Daniel Stenberg
(http://curl.haxx.se/bug/view.cgi?id=2784055) identifying a problem to connect to SOCKS proxies when using the multi interface. It turned out to almost not work at all previously. We need to wait for the TCP connect to be properly verified before doing the SOCKS magic. There's still a flaw in the FTP code for this.
2009-04-21libcurl's memory.h renamed to curl_memory.hYang Tse
2009-02-20- Linus Nielsen Feltzing reported and helped me repeat and fix a problem withDaniel Stenberg
FTP with the multi interface: when a transfer fails, like when aborted by a write callback, the control connection was wrongly closed and thus not re-used properly. This change is also an attempt to cleanup the code somewhat in this area, as now the FTP code attempts to keep (better) track on pending responses necessary to get read in ftp_done().
2009-02-02minor comment fixDaniel Stenberg
2009-01-10- Emil Romanus fixed:Daniel Stenberg
When using the multi interface over HTTP and the server returns a Location header, the running easy handle will get stuck in the CURLM_STATE_PERFORM state, leaving the external event loop stuck waiting for data from the ingoing socket (when using the curl_multi_socket_action stuff). While this bug was pretty hard to find, it seems to require only a one-line fix. The break statement on line 1374 in multi.c caused the function to skip the call to multistate(). How to reproduce this bug? Well, that's another question. evhiperfifo.c in the examples directory chokes on this bug only _sometimes_, probably depending on how fast the URLs are added. One way of testing the bug out is writing to hiper.fifo from more than one source at the same time.
2008-12-20- Igor Novoseltsev fixed a bad situation for the multi_socket() API when doingDaniel Stenberg
pipelining, as libcurl could then easily get confused and A) work on the handle that was not "first in queue" on a pipeline, or even B) tell the app to REMOVE a socket while it was in use by a second handle in a pipeline. Both errors caused hanging or stalling applications.
2008-12-19- curl_multi_timeout() could return a timeout value of 0 even though nothingDaniel Stenberg
was actually ready to get done, as the internal time resolution is higher than the returned millisecond timer. Therefore it could cause applications running on fast processors to do short bursts of busy-loops. curl_multi_timeout() will now only return 0 if the timeout is actually alreay triggered.
2008-12-19- Using the libssh2 0.19 function libssh2_session_block_directions(), libcurlDaniel Stenberg
now has an improved ability to do right when the multi interface (both "regular" and multi_socket) is used for SCP and SFTP transfers. This should result in (much) less busy-loop situations and thus less CPU usage with no speed loss.
2008-12-12- More work with Igor Novoseltsev to first fix the remaining stuff forDaniel Stenberg
removing easy handles from multi handles when the easy handle is/was within a HTTP pipeline. His bug report #2351653 (http://curl.haxx.se/bug/view.cgi?id=2351653) was also related and was eventually fixed by a patch by Igor himself.
2008-12-03- Igor Novoseltsev filed bug #2351645Daniel Stenberg
(http://curl.haxx.se/bug/view.cgi?id=2351645) that identified a problem with the multi interface that occured if you removed an easy handle while in progress and the handle was used in a HTTP pipeline.
2008-10-30Use our Curl_addrinfo definition even when an addrinfo struct is available.Yang Tse
Use a wrapper function to call system's getaddrinfo().
2008-10-25add missing header inclusionsYang Tse
2008-10-19attempt to fix or allow further detection of an elusive icc SIGSEGVYang Tse
2008-10-08- Igor filed bug #2111613 (http://curl.haxx.se/bug/view.cgi?id=2111613) thatDaniel Stenberg
eventually identified a flaw in how the multi_socket interface in some cases missed to call the timeout callback when easy interfaces are removed and added within the same millisecond.
2008-09-29- Bug #2107803 (http://curl.haxx.se/bug/view.cgi?id=2107803) "noDaniel Stenberg
CURLINFO_REDIRECT_URL in multi mode" also contained a patch that fixed the problem.
2008-09-13fix compiler warning: defined but not usedYang Tse
2008-09-13fix compiler warning: external declaration in primary source fileYang Tse
2008-09-10Checked in some code improvements and minor fixes that I discovered in theDan Fandrich
FreeBSD ports system.
2008-09-08Dmitry Kurochkin fixed pipelining over proxy using the multi interfaceDaniel Stenberg
2008-09-06remove unnecessary typecasting of malloc()Yang Tse
2008-09-06remove unnecessary typecasting of calloc()Yang Tse
2008-08-23- Constantine Sapuntzakis fixed a bug when doing proxy CONNECT with the multiDaniel Stenberg
interface, and the proxy would send Connection: close during the authentication phase. http://curl.haxx.se/bug/view.cgi?id=2069047
2008-08-08Fixed an uninitialized variable in multi_runsingle() that could cause aDan Fandrich
request to prematurely end.
2008-06-19- Christopher Palow fixed a curl_multi_socket() issue which previous causedDaniel Stenberg
libcurl to not tell the app properly when a socket was closed (when the name resolve done by c-ares is done) and then immediately re-created and put to use again (for the actual connection). Since the closure will make the "watch status" get lost in several event-based systems libcurl will need to tell the app about this close/re-create case.
2008-06-13In checkPendPipeline() we can't be setting the TIMER_CONNECT correctly as thatDaniel Stenberg
is for the TCP connect. I changed it to TIMER_PRETRANSFER which seems to be what was intended here.
2008-05-28- Emil Romanus found a problem and helped me repeat it. It occured when usingDaniel Stenberg
the curl_multi_socket() API with HTTP pipelining enabled and could lead to the pipeline basically stalling for a very long period of time until it took off again.
2008-05-19with pipelining disabled, the state should never be set to WAITDO but ratherDaniel Stenberg
go straight to DO we had multiple states for which the internal function returned no socket at all to wait for, with the effect that libcurl calls the socket callback (when curl_multi_socket() is used) with REMOVE prematurely (as it would be added again within very shortly)
2008-05-09- Stefan Krause reported a busy-looping case when using the multi interfaceDaniel Stenberg
and doing CONNECT to a proxy. The app would then busy-loop until the proxy completed its response.
2008-05-07Christopher Palow provided the patch (edited by me) that introducesYang Tse
the use of microsecond resolution keys for internal splay trees. http://curl.haxx.se/mail/lib-2008-04/0513.html
2008-04-30- To make it easier for applications that want lots of magic stuff done onDaniel Stenberg
redirections and thus cannot use CURLOPT_FOLLOWLOCATION easily, we now introduce the new CURLINFO_REDIRECT_URL option that lets applications extract the URL libcurl would've redirected to if it had been told to. This then enables the application to continue to that URL as it thinks is suitable, without having to re-implement the magic of creating the new URL from the Location: header etc. Test 1029 verifies it.
2008-03-18- Added curl_easy_getinfo typechecker.Michal Marek
- Added macros for curl_share_setopt and curl_multi_setopt to check at least the correct number of arguments.
2008-02-20- We no longer support setting the CURLOPT_URL option from inside a callbackDaniel Stenberg
such as the CURLOPT_SSL_CTX_FUNCTION one treat that as if it was a Location: following. The patch that introduced this feature was done for 7.11.0, but this code and functionality has been broken since about 7.15.4 (March 2006) with the introduction of non-blocking OpenSSL "connects". It was a hack to begin with and since it doesn't work and hasn't worked correctly for a long time and nobody has even noticed, I consider it a very suitable subject for plain removal. And so it was done.
2008-02-17added a comment about the ignoring of the Curl_done() return codeDaniel Stenberg
2008-02-03- Dmitry Kurochkin cleaned up the pipelining code and removed the need for andDaniel Stenberg
use of the "is_in_pipeline" struct field.
2008-01-27Dmitry Kurochkin: In "real world" testing I found more bugs inDaniel Stenberg
pipelining. Broken connection is not restored and we get into infinite loop. It happens because of wrong is_in_pipeline values.
2008-01-23Dmitry Kurochkin's pipelining close-down segfault fixDaniel Stenberg
2008-01-21Dmitry Kurochkin removed the cancelled state for pipelining, as we agreedDaniel Stenberg
that it is bad anyway. Starting now, removing a handle that is in used in a pipeline will break the pipeline - it'll be set back up again but still...
2008-01-18Lau Hang Kin found and fixed a problem with the multi interface when doingDaniel Stenberg
CONNECT over a proxy. curl_multi_fdset() didn't report back the socket properly during that state, due to a missing case in the switch in the multi_getsock() function.
2008-01-16Dmitry Kurochkin's additional pipelining bugfixDaniel Stenberg
2008-01-16Dmitry Kurochkin worked a lot on improving the HTTP Pipelining support thatDaniel Stenberg
previously had a number of flaws, perhaps most notably when an application fired up N transfers at once as then they wouldn't pipeline at all that nicely as anyone would think... Test case 530 was also updated to take the improved functionality into account.
2008-01-08Introducing curl_easy_pause() and new magic return codes for both the readDaniel Stenberg
and the write callbacks that now can make a connection's reading and/or writing get paused.
2007-11-24struct HandleData is now called struct SingleRequest, and is only for data thatDaniel Stenberg
is inited at the start of the DO action. I removed the Curl_transfer_keeper struct completely, and I had to move out a few struct members (that had to be set before DO or used after DONE) to the UrlState struct. The SingleRequest struct is accessed with SessionHandle->req. One of the biggest reasons for doing this was the bunch of duplicate struct members in HandleData and Curl_transfer_keeper since it was really messy to keep track of two variables with the same name and basically the same purpose!
2007-11-15Rearranged code and changed Curl_readwrite_init() and Curl_pre_readwrite() intoDaniel Stenberg
do_init() and do_complete() which now are called first and last in the DO function. It simplified the flow in multi.c and the functions got more sensible names!
2007-11-05removed space after if and while before the parenthesis for better source codeDaniel Stenberg
consistency
2007-11-03make sure the code deals with failures on the DO_MORE state properlyDaniel Stenberg
2007-09-27Enabled a few more gcc warnings with --enable-debug. Renamed a fewDan Fandrich
variables to avoid shadowing global declarations.
2007-08-31Fixed an invalid returned error code added in my last submission.Dan Fandrich
2007-08-30Fixed a few compiler warnings. Try to do a slightly better job ofDan Fandrich
cleaning up after an OOM condition in curl_multi_add_handle
2007-08-26Fixed some minor mismatched types found by splint.Dan Fandrich
2007-06-26Robert Iakobashvili re-arranged the internal hash code to work with a customDaniel Stenberg
hash function for different hashes, and also expanded the default size for the socket hash table used in multi handles to greatly enhance speed when very many connections are added and the socket API is used.