aboutsummaryrefslogtreecommitdiff
path: root/lib/multi.c
AgeCommit message (Collapse)Author
2006-08-04oops, the previous commit was incomplete as we made an unconditional callDaniel Stenberg
to multi_runsingle() without it being really necessary or good
2006-08-04even when we get a single connection to deal with, we must still check forDaniel Stenberg
timeout'ed connections and possibly deal with them too
2006-08-03removed running_handles argument from multi_runsingle() since it wasn't reallyDaniel Stenberg
used anymore since multi->num_alive was introduced
2006-08-03Silence compiler warning 'unused parameter running_handles' in function ↵Yang Tse
multi_runsingle(). This is done here returning multi->num_alive in the running_handles parameter even when functions that call multi_runsingle() at this moment overwrite the returned value with the one that is valid when those functions curl_multi_perform() and multi_socket() have removed expired timers from the splay. Most probably, parameter 'running_handles' in function multi_runsingle() should be just removed.
2006-08-02keep count of the number of "alive" handles in a struct member, as otherwiseDaniel Stenberg
*multi_socket*() can't return the proper number
2006-08-01spell-fixed a commentDaniel Stenberg
2006-07-30curl_multi_socket() and curl_multi_socket_all() got modified prototypes: theyDaniel Stenberg
both now provide the number of running handles back to the calling function.
2006-07-26[Hiper-related work] Added a function called curl_multi_assign() that willDaniel Stenberg
set a private pointer added to the internal libcurl hash table for the particular socket passed in to this function.
2006-07-17Jari Sundell did some excellent research and bug tracking, figured out thatDaniel Stenberg
we did wrong and patched it: When nodes were removed from the splay tree, and we didn't properly remove it from the splay tree when an easy handle was removed from a multi stack and thus we could wrongly leave a node in the splay tree pointing to (bad) memory.
2006-07-13Oops, missing "u"Yang Tse
2006-07-13Fix compiler warning.Yang Tse
2006-07-10DNS cache must use the multi DNS cache if the easy handle's one is not using ↵Yang Tse
anyone in curl_multi_add_handle.
2006-07-07Ingmar Runge provided a source snippet that caused a crash. The reason forDaniel Stenberg
the crash was that libcurl internally was a bit confused about who owned the DNS cache at all times so if you created an easy handle that uses a shared DNS cache and added that to a multi handle it would crash. Now we keep more careful internal track of exactly what kind of DNS cache each easy handle uses: None, Private (allocated for and used only by this single handle), Shared (points to a cache held by a shared object), Global (points to the global cache) or Multi (points to the cache within the multi handle that is automatically shared between all easy handles that are added with private caches).
2006-06-28fix better minor compiler warningYang Tse
2006-06-28fix minor compiler warningYang Tse
2006-06-23Arve Knudsen found a flaw in curl_multi_fdset() for systems whereDaniel Stenberg
curl_socket_t is unsigned (like Windows) that could cause it to wrongly return a max fd of -1.
2006-06-22Peter Silva introduced CURLOPT_MAX_SEND_SPEED_LARGE andDaniel Stenberg
CURLOPT_MAX_RECV_SPEED_LARGE that limit tha maximum rate libcurl is allowed to send or receive data. This kind of adds the the command line tool's option --limit-rate to the library. The rate limiting logic in the curl app is now removed and is instead provided by libcurl itself. Transfer rate limiting will now also work for -d and -F, which it didn't before.
2006-05-27adapted to the new Curl_splayremovebyaddr() protoDaniel Stenberg
2006-05-26long/int cleanup to silence picky compiler warningsDaniel Stenberg
2006-05-09Robson Braga Araujo fixed a memory leak when you added an easy handle to aDaniel Stenberg
multi stack and that easy handle had already been used to do one or more easy interface transfers, as then the code threw away the previously used DNS cache without properly freeing it.
2006-04-26Fixed signed/unsigned convertion errors in Salford-C.Gisle Vanem
#ifdef around WSAEDISCON in strerror.c.
2006-04-25prevent signed/unsigned warningsDaniel Stenberg
2006-04-21each socket is used by exactly one easy handle, but of course each easy handleDaniel Stenberg
can and will use more than one socket
2006-04-18attempt to silence the MIPSPro compiler warningDaniel Stenberg
2006-04-10First curl_multi_socket() commit. Should primarily be considered as an internalDaniel Stenberg
code rearrange to fit the future better.
2006-02-23argh, forgot the check for a connection before we call Curl_doneDaniel Stenberg
2006-02-23Lots of work and analysis by "xbx___" in bug #1431750Daniel Stenberg
(http://curl.haxx.se/bug/view.cgi?id=1431750) helped me identify and fix two different but related bugs: 1) Removing an easy handle from a multi handle before the transfer is done could leave a connection in the connection cache for that handle that is in a state that isn't suitable for re-use. A subsequent re-use could then read from a NULL pointer and segfault. 2) When an easy handle was removed from the multi handle, there could be an outstanding c-ares DNS name resolve request. When the response arrived, it caused havoc since the connection struct it "belonged" to could've been freed already. Now Curl_done() is called when an easy handle is removed from a multi handle pre-maturely (that is, before the transfer was complteted). Curl_done() also makes sure to cancel all (if any) outstanding c-ares requests.
2006-02-11Karl M added the CURLOPT_CONNECT_ONLY and CURLINFO_LASTSOCKET options thatDaniel Stenberg
an app can use to let libcurl only connect to a remote host and then extract the socket from libcurl. libcurl will then not attempt to do any transfer at all after the connect is done.
2005-03-08remove old printf() debug leftoverDaniel Stenberg
2005-02-09FTP code turned into state machine. Not completely yet, but a good start.Daniel Stenberg
The tag 'before_ftp_statemachine' was set just before this commit in case of future need.
2005-01-30if the DO operation returns failure, bail out and close down nicely toDaniel Stenberg
prevent memory leakage
2005-01-29Using the multi interface, and doing a requsted a re-used connection thatDaniel Stenberg
gets closed just after the request has been sent failed and did not re-issue a request on a fresh reconnect like the easy interface did. Now it does! (define CURL_MULTIEASY, run test case 160)
2005-01-29multi interface: when a request is denied due to "Maximum redirects followed"Daniel Stenberg
libcurl leaked the last Location: URL.
2005-01-25Use plain structs and not typedef'ed ones in the hash and linked-list code.Daniel Stenberg
2005-01-11Renamed easy.h and multi.h to easyif.h and multiif.h to make sure they don'tDaniel Stenberg
shadow our public headers with the former names.
2005-01-11Cyrill Osterwalder posted a detailed analysis about a bug that occurs whenDaniel Stenberg
using a custom Host: header and curl fails to send a request on a re-used persistent connection and thus creates a new connection and resends it. It then sent two Host: headers. Cyrill's analysis was posted here: http://curl.haxx.se/mail/archive-2005-01/0022.html
2005-01-10Use Curl_easy_addmulti() to clear associations from easy handles to multiDaniel Stenberg
handles. Include multi.h to get proto.
2005-01-10Pavel Orehov reported memory problems with the multi interface in bug reportDaniel Stenberg
#1098843. In short, a shared DNS cache was setup for a multi handle and when the shared cache was deleted before the individual easy handles, the latter cleanups caused read/writes to already freed memory.
2004-08-31fix the return code for curl_multi_add_handle()Daniel Stenberg
2004-06-29First attempt at making the multi interface work when connecting to a hostDaniel Stenberg
that resolves to multiple IP addresses.
2004-05-17new Curl_done() protoDaniel Stenberg
2004-05-17better bailing out on memory failureDaniel Stenberg
2004-05-17bail out nicely if strdup() returns NULL, removed trailing whitespaceDaniel Stenberg
2004-05-13return on memory alloc failDaniel Stenberg
2004-05-12Curl_done() and the protocol-specific conn->curl_done() functions now allDaniel Stenberg
take a CURLcode as a second argument, that is non-zero when Curl_done() is called after an error was returned from Curl_do() (or similar).
2004-05-11curl_global_init_mem() allows the memory functions to be replaced.Daniel Stenberg
memory.h is included everywhere for this.
2004-04-26Major hostip.c cleanup and split into multiple files and easier #ifdefDaniel Stenberg
usage.
2004-03-30adjusted to the new dns cache function to hide more hostip internalsDaniel Stenberg
2004-03-30init the dns pointer to NULL for clarityDaniel Stenberg
2004-03-11Gisle Vanem's fixes to use CURL_SOCKET_BAD more instead of -1 for sockets.Daniel Stenberg