Commit Graph

2818 Commits

Author SHA1 Message Date
Aleric Inglewood
94ebcdeb6b Add eight missing headers...
How did you ever get this to compile if those
headers were removed from the precompiled header?
2012-08-10 07:23:29 +02:00
Aleric Inglewood
152238e67f Merge remote-tracking branch 'shyotl/breakforce' into breakforce 2012-08-10 05:56:28 +02:00
Shyotl
eef51e0bd0 Pulled llpacketring.h and llhttpclient.h out of the precompiled header. 2012-08-09 22:50:05 -05:00
Aleric Inglewood
91df8446b0 Oops bug fix for last commit. 2012-08-10 05:37:41 +02:00
Aleric Inglewood
ffb55f482a Compile fixes for windows. 2012-08-10 05:35:11 +02:00
Aleric Inglewood
b2c5a84964 Replace CURLOPT_POSTFIELDSIZE_LARGE with CURLOPT_POSTFIELDSIZE
Also adds a more robust interface for setopt that does
type checking based on the options used. This fixes one
bug where a F32 was passed and interpreted as long.
In many cases a U32 or S32 was passed as long, which
would fail (only) on a 64bit non-windows big endian machine.
2012-08-10 04:18:04 +02:00
Aleric Inglewood
0054e6a378 Bug fix.
Fixes an exit crash when the user clicks on Login and immediately
on Quit, because termination of the LLAuth curl request statemachine
access the CurlRequestTimeOut debug setting.
2012-08-09 07:04:23 +02:00
Aleric Inglewood
76e30150b9 Removed superfluous debug output 2012-08-09 07:02:42 +02:00
Aleric Inglewood
cd197a3807 Fix LL_REF_COUNT_DEBUG debug code.
This code was broken with respect to LLAPRPool.
Fix that, and also fixed it for the new AIThreadID API.
2012-08-09 07:00:51 +02:00
Aleric Inglewood
b9673df961 Clean up of debug.h: just use LL_COMMON_API. 2012-08-09 06:57:53 +02:00
Aleric Inglewood
37c8ea54eb Add AIThreadID - Cleanup of apr_os_thread* related code.
Apart from just really cleaning things up and moving
everything into one class regarding thread IDs (ie,
is_main_thread(), comparing ID's etc), this also
fixes an obscure bug where LL was casting thread ID's
to U32 and then compared those to find out if it
the same thread. It's theoretically possible that
such fails on a 64bit OS.

By generalizing the interface, I adopted the use
of a thread-local cache for the current thread ID
as used by LLMutex et al, so now all code benefits
from that. The idea was even extended to now also
be used for is_main_thread() tests and even resetting
a thread ID to the ID of the current thread.
2012-08-09 06:30:31 +02:00
Aleric Inglewood
f94f458922 Print CURL_SOCKET_TIMEOUT for that particular value. 2012-08-08 04:10:34 +02:00
Aleric Inglewood
89ef06fd3f Compiler warning fixes. Take into account that debug_libcurl.cpp is no longer linked dynamically. 2012-08-08 01:58:49 +02:00
Aleric Inglewood
ccd135b2a6 and again 2012-08-08 01:04:27 +02:00
Aleric Inglewood
80eb0851d9 Fix stupidity 2012-08-08 01:02:08 +02:00
Aleric Inglewood
b84f470fca Bug fix: curl_off_t has a different size than void* on 32 bit. 2012-08-08 00:40:01 +02:00
Aleric Inglewood
5caeccc007 Final compile/link bug fixes for debug_libcurl code.
renamed cwdebug/debug_libcurl.cc -> llmessage/debug_libcurl.cpp
    and cwdebug/debug_libcurl.h  -> llmessage/debug_libcurl.h,
because debug_libcurl.cpp does curl calls that do ares and
openssl calls, so we need to link with those libraries.
llmessage is already linking with those libraries, and contains
the main entry point aicurl.h, so it's a suitable place to put
this.

Bug fix: must always include llpreprocessor.h before including
curl/curl.h.

Bug fix: Added #include "debug_libcurl.h" to hipporestrequest.cpp
and llurlsimstring.cpp which I missed before because they
included "curl/curl.h" instead of <curl/curl.h>. Same in
llwaterparammanager.cpp, but removed include there because it
isn't needed.

Now test DEBUG_CURLIO before including debug_curlio, that
seems better, because otherwise it would make more sense to
replace all #include <curl/curl.h> with #include "mycurl.h"
and then do it there-- but I didn't want to do that.

Bug fix: we undef-ed CURLOPT_DNS_USE_GLOBAL_CACHE, while really
that is an enum, not a macro.

Fixed DEBUG_WINDOWS_CODE_ON_LINUX again by adding a hack for
ioctlsocket(), not instantiating dumb_socketpair unless
DEBUG_WINDOWS_CODE_ON_LINUX is defined and removing again ^M's
introduced with the new windows non-blocking code.
Also changed the type of flags passed to fcntl to int (was long).
2012-08-07 20:57:39 +02:00
Aleric Inglewood
477c657f60 Merge remote-tracking branch 'singu/breakforce' into breakforce 2012-08-07 16:19:20 +02:00
Aleric Inglewood
cc50e620c0 Merge branch 'curlthreading2' into breakforce 2012-08-07 05:22:10 +02:00
Aleric Inglewood
2fbf6b732e Fix undefined symbols linker error on linux / relwithdebinfo.
See http://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Interface.html
With this patch, the #pragma will also be used with icc and clang,
I didn't test this.
2012-08-07 05:18:24 +02:00
Aleric Inglewood
93416e40a4 Compile fix: CURLOPT_SSL_OPTIONS was also added since 7.25.0 2012-08-07 05:16:59 +02:00
Aleric Inglewood
e14be5c8c2 Make debug_libcurl.cc compile with libcurl 7.21 and higher 2012-08-07 01:33:29 +02:00
Aleric Inglewood
65a1aae629 Bug fix
curl_easy_setopt expects a long int. Before this patch,
uninitialized memory was read, leading to extreme long
time out, instead of the intended disabled time out (so,
in practise this patch has little effect).

This bug was discovered with the previous commit.
2012-08-05 18:55:27 +02:00
Aleric Inglewood
caef97ad36 Print all libcurl calls if -DDEBUG_CURLIO. Don't create static lib for cwdebug.
Basically, cmake doesn't support linking static libs into a shared lib.
The correct way is to just specify source files in subdirectories
directly as source files of the shared library. This patch changes that.

Also, after this commit, when DEBUG_CURLIO is defined, every call to
libcurl is printed to llinfos (or to dc::curl when using libcwd).
2012-08-05 18:51:21 +02:00
Siana Gearz
761439cc8d Setting socket pair non-blocking 2012-08-05 08:20:31 +02:00
Aleric Inglewood
98c740f204 Remove debug output 2012-08-03 00:56:41 +02:00
Aleric Inglewood
255742db26 Merge branch 'curlthreading2' into breakforce 2012-08-03 00:54:12 +02:00
Aleric Inglewood
af4ceb0658 Crash on exit fix. 2012-08-03 00:53:54 +02:00
Aleric Inglewood
08d72b12ab Fix compilation on linux. Remove trailing ^M's 2012-08-02 23:03:03 +02:00
Siana Gearz
4650636e5a Use TCP socket pair instead of UDP 2012-08-02 22:33:01 +02:00
Aleric Inglewood
725cdc2d69 Linux compile fixes 2012-07-31 23:04:45 +02:00
Siana Gearz
048c57cf0c Linktime fix 2012-07-31 22:40:20 +02:00
Siana Gearz
12dcbfbc79 Merge remote-tracking branch 'aleric/breakforce' into breakforce 2012-07-31 22:39:48 +02:00
Aleric Inglewood
32be05fa6c Compile warning fixes. Type fix (SLL -> SSL) 2012-07-31 22:37:49 +02:00
Aleric Inglewood
ae62b67554 Merge branch 'curlthreading2' into breakforce 2012-07-31 22:24:57 +02:00
Siana Gearz
9c4f22d85b Attempt at fixing linker errors... 2012-07-31 21:30:05 +02:00
Siana Gearz
7f64668e55 Compile warning fix 2012-07-31 21:29:22 +02:00
Siana Gearz
0208942b84 Compile warning fix 2012-07-31 21:28:37 +02:00
Siana Gearz
783e86990c Compile fixes 2012-07-31 19:42:15 +02:00
Aleric Inglewood
c9715c5b0b Print Dout() and DoutEntering() debug output on windows.
This is a bit of a hack currently and requires a
recompile with -DDEBUG_CURLIO.
2012-07-31 04:57:13 +02:00
Aleric Inglewood
dd47123bde Add possibility to suppress function name prefix in debug output.
Adds llinfos_nf et al.
2012-07-31 04:56:03 +02:00
Aleric Inglewood
3de21156b5 Windows code improvements and debugging.
Extended the DEBUG_WINDOWS_CODE_ON_LINUX hack to include ALL code.
memset-zero sockaddr_in, and use WSASocket as per suggestion of Shyotl.
2012-07-30 02:46:48 +02:00
Aleric Inglewood
ce2c6ab49e Don't crash when libcurl wasn't compiled with support for libz 2012-07-30 02:45:39 +02:00
Aleric Inglewood
d19c5a4a4a Move apr_os_thread_current_wrapper closer to where it's used, and fix a comment. 2012-07-30 02:44:51 +02:00
Aleric Inglewood
8945fe4857 Unbreak standalone install on 64bit linux 2012-07-30 01:47:27 +02:00
Aleric Inglewood
464919072d Use LLBufferArray instead of std::stringstream for CurlResponderBuffer::mInput
Note the changed code is never used yet.  CurlResponderBuffer::curlReadCallback
is only called when Request::post is being used, which is never used.
2012-07-29 22:52:20 +02:00
Siana Gearz
f8c2087d74 Preliminary Windows support for curlthreading 2012-07-29 22:47:19 +02:00
Siana Gearz
7adc0e24ab Merge branch 'curlthreading2' of git://github.com/AlericInglewood/SingularityViewer into curlthreading 2012-07-29 21:32:24 +02:00
Aleric Inglewood
ba65f29a72 Fix draining of wake up pipe.
This is a bug fix, although not one we'd ever run into as normally
there is always just one byte to read, never an EAGAIN and certainly
never more than 256 bytes. Anyway, also those cases should work now.
2012-07-29 21:12:45 +02:00
Aleric Inglewood
76eef6fe59 Avoid crash on exit. 2012-07-29 18:38:59 +02:00