Richard Fuchs
57051ee86f
use a sane default port range
14 years ago
Richard Fuchs
fe3af2559e
support listening on NG port through init/defaults
14 years ago
Richard Fuchs
9f276ad73d
inlining ftw
14 years ago
Richard Fuchs
5d1c2aabed
support some flags passed from rtpproxy-ng module
14 years ago
Richard Fuchs
5accfd0751
dont return ipv6 address by default
14 years ago
Richard Fuchs
011e0e7e4e
unify call_update_udp and call_lookup_udp
14 years ago
Richard Fuchs
e5d7341bdc
unify call_request and call_lookup
14 years ago
Richard Fuchs
6fd39168f1
obsolete infohash
14 years ago
Richard Fuchs
ecc37e4b2a
fix segfault related to null log_info
14 years ago
Richard Fuchs
b66809bb8c
use new struct stream_input where appropriate
14 years ago
Richard Fuchs
21e18c086e
obsolete the "mediatype" element
14 years ago
Richard Fuchs
8fe26b2d3b
obsolete the "mediatype" element
14 years ago
Richard Fuchs
9589a73b42
obsolete call{ed,ing}_agent element
14 years ago
Richard Fuchs
ea16a5daa2
fix some resulting segfaults
14 years ago
Richard Fuchs
1160c5c0ad
fulfil the promise of actually freeing the free list
14 years ago
Richard Fuchs
337167faf7
use enum stream_address_format
14 years ago
Richard Fuchs
923a7bdf5a
correctly mark ip6 address
14 years ago
Richard Fuchs
c75394d3cd
first take on SDP rewriting
14 years ago
Richard Fuchs
45c38179d1
those updates break the redis module
14 years ago
Richard Fuchs
2b60a82e36
more mass deployment of the new "str" object - does this thing still work? now really?
14 years ago
Richard Fuchs
edc60d05f9
convenience functions required by rtpproxy-ng
14 years ago
Richard Fuchs
60da1bc445
mass deployment of the new "str" object - does this thing still work?
14 years ago
Richard Fuchs
8db7ab6c94
introduce kamailio-style "str" data type/struct
...
also remove several occurences of "const" that keep biting me in the rear.
14 years ago
Richard Fuchs
ccfa304354
sdp_streams() initial implementation
14 years ago
Richard Fuchs
f6a336ce89
prefer objects on stack instead of heap when possible
14 years ago
Richard Fuchs
a2ac8075a9
WIP on SDP parser
14 years ago
Richard Fuchs
7cc6d95338
adding preliminary SDP parser
14 years ago
Richard Fuchs
a8cc93f7a3
get rid of that silly len counter
14 years ago
Richard Fuchs
c5be7346a6
hard-link bencode.[ch] from kamailio source for now
14 years ago
Richard Fuchs
be4a6c7d58
make my life easier with a smart_ntop_port() function
14 years ago
Richard Fuchs
5ea5dcddfa
call_offer()/answer stubs
14 years ago
Richard Fuchs
fb20c7491d
implement receiving and parsing NG protocol packets
14 years ago
Richard Fuchs
76cab1f697
non-static vars must be initialized to 0
14 years ago
Richard Fuchs
3a30e186c4
dont use RE_UDP_ macros for indexes into the fallback RE
14 years ago
Richard Fuchs
4700a6dea0
split generic udp receiving code into udp_listener
14 years ago
Richard Fuchs
ab24a79de9
adding control_ng stubs
14 years ago
Richard Fuchs
189c19eb03
init function should return success too
14 years ago
Richard Fuchs
1912346c35
remember: git commit -a doesnt commit new files
14 years ago
Richard Fuchs
67e876ff97
split udp listener init code into separate file
14 years ago
Richard Fuchs
32523c5896
split cookie cache keeping into separate file
14 years ago
Richard Fuchs
27835dc50e
split cookie cache keeping into separate file
14 years ago
Richard Fuchs
78712cf7c9
rename listen to listen-tcp in error outputs as well
14 years ago
Richard Fuchs
8ae44f7aa6
silly bugfix for the init fail case
14 years ago
Richard Fuchs
a7d40bf7bc
rename --listen to --listen-tcp
14 years ago
Richard Fuchs
8708c99e33
add bencode lib to sources
14 years ago
Richard Fuchs
bca25d7700
make call_lookup_udp() remember viabranches like call_update_udp()
14 years ago
Richard Fuchs
b36afb6183
exclude deprated API calls
14 years ago
Richard Fuchs
ef521030ab
make viabranch in udp lookup optional
14 years ago
Richard Fuchs
6755ce3e49
fix RE regression
14 years ago
Richard Fuchs
ed7f8dda04
remove obsolete code; add more locking
14 years ago
Richard Fuchs
644e5ba9df
calculate proper "TTL"
14 years ago
Richard Fuchs
bbb8327750
implement udp Q command
14 years ago
Richard Fuchs
a99ada4e41
add more logging to xmlrpc call mechanism
14 years ago
Richard Fuchs
eda487e579
un-shoot myself in the foot, gna
14 years ago
Richard Fuchs
8092a56761
another locking fix
14 years ago
Richard Fuchs
bb054ec00b
fix more locking problems
14 years ago
Richard Fuchs
3a26e9fceb
fix possible race condition
14 years ago
Richard Fuchs
39207a0859
dont fail on zero port in tcp controller
14 years ago
Richard Fuchs
37013fd148
IPv6 socket requires IPv4 PKTINFO for setting source address correctly
14 years ago
Richard Fuchs
59c5ffd0da
fix reference count leak
14 years ago
Richard Fuchs
08d40d8ac5
add debian buildflags and address generated warnings
14 years ago
Richard Fuchs
59e47df1d6
remove obsolete makefile target and add missed \n to simulator script
14 years ago
Richard Fuchs
d751d10093
check struct sizes and offsets exported by redis plugin
14 years ago
Richard Fuchs
594297a3ea
use string chunk for all the little call-related strings
14 years ago
Richard Fuchs
afb1f5de95
need to lock the call a bit earlier
14 years ago
Richard Fuchs
d8ef1885cc
split callstream_init into callstream_new for redis module
14 years ago
Richard Fuchs
2e189c5eb5
echo core >> .gitignore
14 years ago
Richard Fuchs
c291d1220b
fix logging inconsistency
14 years ago
Richard Fuchs
9077fac612
be a lazy developer and try to load the .so locally
14 years ago
Richard Fuchs
a9823f2323
adding .gitignore files
14 years ago
Richard Fuchs
da02558511
its always nice to call openlog()
14 years ago
Richard Fuchs
72840c8d1d
reorder calls to redis for proper locking
14 years ago
Richard Fuchs
7e38c7a96f
a more robust thread shutdown procedure
14 years ago
Richard Fuchs
d20d747a63
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!
14 years ago
Richard Fuchs
2ad1d6f65e
xmlrpc still segfaulting. leaves no choice but to fork out a new process, ugh.
14 years ago
Richard Fuchs
f4833f6b74
xmlrpc calls still causing segfaults, lets try with a dedicated client object per call... i'm starting to dislike this library
14 years ago
Richard Fuchs
a4625fbad9
enough with the glib threading nonsense, it's only causing problems. revert to good old pthread stuff
14 years ago
Richard Fuchs
fabcb53a3b
the curl xmlrpc transport isnt playing nicely - revert to default
14 years ago
Richard Fuchs
08c764c748
cant decref null references
14 years ago
Richard Fuchs
4b7d4d24cd
dont block fatal core-dumping signals
14 years ago
Richard Fuchs
0f6d898171
add proper locking to callstream setup procedure
14 years ago
Richard Fuchs
94f2f320a6
actually the call struct needs neither linked flag nor shutdown flag due to the sequence of events and locking
14 years ago
Richard Fuchs
d8776907f8
need to lock the callstream a bit earlier
14 years ago
Richard Fuchs
ab3b8c60f0
fix a silly, threading-unrelated, statistics-skewing bug
14 years ago
Richard Fuchs
45f34b9784
turns out you actually have to free/destroy mutexes. who woulda thunk?
14 years ago
Richard Fuchs
54353022ff
om nom nom memory leak... well, reference count leak
14 years ago
Richard Fuchs
b7a68659b1
analoguous to the last race, call_destroy() must not assume that it's getting the last reference to the call
14 years ago
Richard Fuchs
683b716885
here we go with the subtle race conditions
14 years ago
Richard Fuchs
806920cc52
dont abort polling on EINTR
14 years ago
Richard Fuchs
0d6349f14c
and for the interesting part: multiple poller threads
14 years ago
Richard Fuchs
942c96c96d
move poller timers and polling into a separate thread
14 years ago
Richard Fuchs
d25d1c2009
making main() pretty by moving stuff out of the way
14 years ago
Richard Fuchs
ddffe5eeec
global xmlrpc init must be done prior to any threading
14 years ago
Richard Fuchs
d1fbf9bef9
alarms arent usable in a threaded environment, so use curl internal timeout instead
14 years ago
Richard Fuchs
feeeee2fab
must extract needed tags for xmlrpc call teardown prior to destroying the calls
14 years ago
Richard Fuchs
973d92d9c7
moving call teardown due to timeout to a separate thread
14 years ago
Richard Fuchs
47a9a00a11
it makes no sense to return a value from an effectively detached thread
14 years ago
Richard Fuchs
31a5ff9c29
detached threads considered harmful, so simulate them by keeping a threads-to-join list
14 years ago
Richard Fuchs
bc647862e5
use sigtimedwait for proper sighandler thread shutdown
14 years ago
Richard Fuchs
badae5a874
lets get some threads going then, starting with a signal handler
14 years ago
Richard Fuchs
2dd6cfe68c
keeping the lock hold time to a minimum in lengthy calls_status operation
14 years ago
Richard Fuchs
8c2c69f5e6
make the stats collection thread-safe
14 years ago
Richard Fuchs
d9e09f33bc
lets try with a lot of large, nested, naive locks
14 years ago
Richard Fuchs
ae5a36f5ce
getting rid of call->log_info and introducing call->lock
14 years ago
Richard Fuchs
900f76a17e
make the callmaster struct private - also requires update to redis module
14 years ago
Richard Fuchs
aeb5398b0d
granular lock for "ports used" bit field
14 years ago
Richard Fuchs
a8680cc2d9
TOS for ipv6 needs an int to work
14 years ago
Richard Fuchs
0b0b41e67f
gonna need more than one lock in callmaster, so rename the one we have
14 years ago
Richard Fuchs
4cb63b5edf
need to handle the no-reply case to avoid deadlocks with bad cookies
14 years ago
Richard Fuchs
4588e13a76
getting rid of more global variables
14 years ago
Richard Fuchs
e033d1da1c
EINTR requires special handling
14 years ago
Richard Fuchs
1ec2c96655
living on the edge with epoll edge-triggered behavior
14 years ago
Richard Fuchs
db15692f21
using thread-local-storage for eliminating constant calls to time()
14 years ago
Richard Fuchs
45945f6c7f
it helps to actually initialize the condition var
14 years ago
Richard Fuchs
26824993e2
preliminary attempt to make the udp controller thread-safe
14 years ago
Richard Fuchs
5f5e158d76
private structs make for safer threading
14 years ago
Richard Fuchs
ebd2893e96
missing a streambuf lock here
14 years ago
Richard Fuchs
419f6bb230
and the tcp controller becomes thread-safe
14 years ago
Richard Fuchs
6e474ccfc0
add appropriate threading compile flags
14 years ago
Richard Fuchs
c75aecc282
make use of "make debug" target
14 years ago
Richard Fuchs
7dc00bd258
making timers thread-safe
14 years ago
Richard Fuchs
4b74e6f476
use obj_* to catch double-free errors
14 years ago
Richard Fuchs
b3ef1995fc
add mutex_trylock primitives
14 years ago
Richard Fuchs
de33b8da40
add basic locking to callmaster struct
14 years ago
Richard Fuchs
9dab795a17
disable object debugging, seems to work fine
14 years ago
Richard Fuchs
8dcd2c89c4
add rwlock type and primitives
14 years ago
Richard Fuchs
26f29aefeb
object size isnt really a useful piece of information
14 years ago
Richard Fuchs
8e5ad59558
make the obj_ primitives more liberal to make for easier calling
14 years ago
Richard Fuchs
f05156a58e
catch the inevitable disaster early and define our own mutex types. sigh. and there i was, thinking that using the glib types would make things easier.
14 years ago
Richard Fuchs
806c97246c
glib < 2.32 requires use of distinct static mutex type
14 years ago
Richard Fuchs
145bbd1f7c
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.
14 years ago
Richard Fuchs
5d1410c61a
remove obsolete targets from makefile
14 years ago
Richard Fuchs
effc21b26c
mybsearch function is also obsolete
14 years ago
Richard Fuchs
2594da3b45
dont poll kernel list when table couldnt be opened
14 years ago
Richard Fuchs
9bff0cf86c
lets be more strict with timer removal
14 years ago
Richard Fuchs
1fa2f614d4
it's inefficient to walk the entire list of poller items every second just to look for times which we don't really use. so instead, use the linked timers list for this purpose. this is also inefficient for timer remove, but since we don't use those times anyway, we don't care.
14 years ago
Richard Fuchs
fa6039e71d
BSEARCH macro is obsoleted
14 years ago
Richard Fuchs
52e297f864
use glib slice allocator in poller
14 years ago
Richard Fuchs
8d50923508
good bye poll(), hello epoll_*()
14 years ago
Richard Fuchs
b7c8ddf1a0
update .so name to match .deb
14 years ago
Richard Fuchs
2a8c07df0e
take rtcp ports into account when checking for timeouts
14 years ago
Richard Fuchs
70ac6a274c
take 0-byte packets into consideration when updating peer info for NAT'd streams
14 years ago
Richard Fuchs
24cf5a0ca0
dump packet stats upon call teardown
14 years ago
Richard Fuchs
b6650a9d78
increase max udp packet len to 8192 and add warning message if the limit is hit
14 years ago
Richard Fuchs
c9f6e07846
log version upon startup
14 years ago
Richard Fuchs
e4575cf31f
who knew that zero-length udp packets are valid?
14 years ago
Richard Fuchs
33b7872115
be a bit more clear in the read error message
14 years ago
Richard Fuchs
35404af428
log error code upon RTP socket error
14 years ago
Richard Fuchs
dc7517121d
remove uuid helper code
14 years ago