Richard Fuchs
f20f72c27a
reorder calls to redis for proper locking
13 years ago
Richard Fuchs
2832dadc00
since xmlrpc is still segfaulting even in its own process, disable core dumps in the child and retry the xmlrpc call up to 3 times if the child terminates abnormally. jumping through hoops ftw!
13 years ago
Richard Fuchs
5e63928da4
xmlrpc still segfaulting. leaves no choice but to fork out a new process, ugh.
13 years ago
Richard Fuchs
41da40f2f7
xmlrpc calls still causing segfaults, lets try with a dedicated client object per call... i'm starting to dislike this library
13 years ago
Richard Fuchs
71b38dd1f5
the curl xmlrpc transport isnt playing nicely - revert to default
13 years ago
Richard Fuchs
a131fd6803
cant decref null references
13 years ago
Richard Fuchs
c11d0e2882
add proper locking to callstream setup procedure
13 years ago
Richard Fuchs
5f40e7d173
actually the call struct needs neither linked flag nor shutdown flag due to the sequence of events and locking
13 years ago
Richard Fuchs
81562e0a50
need to lock the callstream a bit earlier
13 years ago
Richard Fuchs
19f4bc3121
fix a silly, threading-unrelated, statistics-skewing bug
13 years ago
Richard Fuchs
5ea20be0ae
turns out you actually have to free/destroy mutexes. who woulda thunk?
13 years ago
Richard Fuchs
7b20eb4b84
om nom nom memory leak... well, reference count leak
13 years ago
Richard Fuchs
cb9967260e
analoguous to the last race, call_destroy() must not assume that it's getting the last reference to the call
13 years ago
Richard Fuchs
e5aa11aa6b
global xmlrpc init must be done prior to any threading
13 years ago
Richard Fuchs
22043b686f
alarms arent usable in a threaded environment, so use curl internal timeout instead
13 years ago
Richard Fuchs
4304bf48c2
must extract needed tags for xmlrpc call teardown prior to destroying the calls
13 years ago
Richard Fuchs
358a194dcc
moving call teardown due to timeout to a separate thread
13 years ago
Richard Fuchs
bfcfc7b471
keeping the lock hold time to a minimum in lengthy calls_status operation
13 years ago
Richard Fuchs
95d9de7bc4
make the stats collection thread-safe
13 years ago
Richard Fuchs
c19b99903c
lets try with a lot of large, nested, naive locks
13 years ago
Richard Fuchs
28ac7b996c
getting rid of call->log_info and introducing call->lock
13 years ago
Richard Fuchs
9fecc4d153
make the callmaster struct private - also requires update to redis module
13 years ago
Richard Fuchs
e02b5398ce
granular lock for "ports used" bit field
13 years ago
Richard Fuchs
dd48d554c9
TOS for ipv6 needs an int to work
13 years ago
Richard Fuchs
1b20dcaa44
gonna need more than one lock in callmaster, so rename the one we have
13 years ago
Richard Fuchs
0dac780f86
getting rid of more global variables
13 years ago
Richard Fuchs
c8021adadf
EINTR requires special handling
13 years ago
Richard Fuchs
8edc107f2d
using thread-local-storage for eliminating constant calls to time()
13 years ago
Richard Fuchs
161b2eec6a
private structs make for safer threading
13 years ago
Richard Fuchs
c24514404e
missing a streambuf lock here
13 years ago
Richard Fuchs
2905c333f7
making timers thread-safe
13 years ago
Richard Fuchs
e01692c297
add basic locking to callmaster struct
13 years ago
Richard Fuchs
856c0b9cce
make the obj_ primitives more liberal to make for easier calling
13 years ago
Richard Fuchs
2b63e794df
Prepare for multi-threaded operation
...
Introduce generic "objects" with reference counting primitives and automatic
resource deallocation when no refs are left ("garbage collection"). Overhaul
poller framework to make extensive use of these objects to allow for future
thread-concurrent operation.
No locking added anywhere yet except in poller. Poller is still not 100%
thread safe, but close.
Valgrind reports no errors or memleaks.
13 years ago
Richard Fuchs
1ee9782b98
dont poll kernel list when table couldnt be opened
13 years ago
Richard Fuchs
48f0a61277
good bye poll(), hello epoll_*()
13 years ago
Richard Fuchs
f3a5ea2eb8
take rtcp ports into account when checking for timeouts
13 years ago
Richard Fuchs
f28fea205b
take 0-byte packets into consideration when updating peer info for NAT'd streams
13 years ago
Richard Fuchs
6c6332ed91
dump packet stats upon call teardown
13 years ago
Richard Fuchs
376dd662ba
increase max udp packet len to 8192 and add warning message if the limit is hit
13 years ago
Richard Fuchs
44db4d4548
who knew that zero-length udp packets are valid?
13 years ago
Richard Fuchs
5dfb33aa9d
be a bit more clear in the read error message
13 years ago
Richard Fuchs
e9f0681d45
log error code upon RTP socket error
13 years ago
Richard Fuchs
f775df551c
separate redis code from main code - modularize!(tm)
13 years ago
Richard Fuchs
4090cb4a93
add alarm timeout for xmlrpc calls
13 years ago
Richard Fuchs
3fc55e0eae
we need to use the to-tag for sems
13 years ago
Richard Fuchs
af0d2e9e45
make RPC call to SBC upon RTP timeout for call teardown
13 years ago
Richard Fuchs
a23fe2f7b6
Fall back to userspace forwarding if kernel module is unavailable
13 years ago
Richard Fuchs
cefa4d764d
correctly restore ipv4 addresses from redis
13 years ago
Richard Fuchs
241d479de2
Push viabranch info into redis and restore it as well
13 years ago