cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Multithreaded Issues

From: Dylan Salisbury <dylan_at_tellme.com>
Date: Mon, 23 Aug 2004 15:42:06 -0700

You might be overflowing your data buffers (local variables writeBuffer and
readBuffer). Here are some questions about your callback functions:

1. What do your callback functions do if the amount of data given to them is
more than BIG_BUFFER_SIZE?

2. Do they correctly deal with the response being split up between multiple
calls?

3. Do they assume that the buffer will be initialized to anything in
particular before the first time libcurl calls them? The code you posted
does not initialize the buffers, so they may contain data from previous
calls.

>From the code that you posted, I would guess that your callbacks are not
robust enough, and when you test with all GETs or all PUTs you do not notice
the problem because all the actions are very similar.

If this reply is not helpful enough, you could post your callback functions
to the list, as well as a more specific description of the undesirable
behavior.

Dylan
Received on 2004-08-24