Richard Fuchs
80dc4e60ef
MT#59962 AmUtils: use overloading for str2int
...
Use overloading for the various flavours of str2int functions. This has
the benefit of automatically choosing the appropriate function for
aliased types that may be one or the other underlying type, such as
size_t.
Do a mass renaming of all relevant instances.
Change-Id: I7abb6b9031ee53332d2b04a6cba4a6cc667a4807
10 months ago
Donat Zenichev
f343df5587
MT#60480 Limitation of origin id/ver to 64bits (unsigned long long)
...
SDP session origin id and version are limited by it's size
to 64 bits (8 bytes), that is because we are using `unsigned long long`
type for both id and version. Hence the maximum value it can hold
is two sixty-forth power, so equals: 18,446,744,073,709,551,615
In case one intentionally sets it to something like:
"o=- 18446744073709551615 18446744073709551615 IN IP4 192.168.0.1"
SEMS gets overwhelmed with that conversion inside the code make
it just to a string literal 'F'.
To overcome it, just use __uint128 (which is of 128bits size)
for the session origin id and version.
Change-Id: I2ad9659aa81dad79969749053dc3fd0d69e2cbd2
2 years ago
Donat Zenichev
ced4a52c5d
MT#56772 AmSdp: covert sessId / sessV to llu
...
Use `unsigned long long` for SDP session id and version
instead of unsigned int.
Refactor all usage of them accordingly.
Additionally intrdouce new utils functions for conversion:
- `ulonglong2str()` - converts `unsigned long long` to `string`
- `str2ull()` - converts `string` to `unsigned long long`
Change-Id: I4210349a5442d4173b14227497f4a01d68cad7a4
2 years ago
Victor Seva
ff47897962
Imported Upstream version 1.6.0~20140516~eaa616
12 years ago
Victor Seva
d8b3cbf475
Imported Upstream version 1.4.3
13 years ago
Stefan Sayer
16597a62b2
utils: added URL_encode and URL_decode functions
13 years ago
Alena Zhuchek
dd71a7f44f
b/f: fix incorrect parsing of keys with semicolon at the beginning in get_header_keyvalue
...
e.g. P-App-Param: ;u=user;d=domain would not be parsed correctly.
internal bug #74
fixes commit 8193c35a
14 years ago
Stefan Sayer
a10771c603
b/f: fix false positive matching keys with prefixes in get_header_keyvalue
...
e.g. P-App-Param: prefixmykey=myprefixval;mykey=myval would not work with
mykey.
int bug #59
14 years ago
Raphael Coeffic
e33dd5bd7e
some cleanup in AmUtils.
15 years ago
Raphael Coeffic
fbd68ba85e
b/f: added name support for get_local_addr_for_dest().
15 years ago
Raphael Coeffic
6dd81ab3e6
functions to detect the local IP to use
...
the mechanism used is very simple:
- create a temporary UDP socket
- connect it to the remote destination
- use getsockname to read the local IP
15 years ago
Stefan Sayer
4ab3f7cca9
fix compilation (used 'separator')
15 years ago
Stefan Sayer
8a9bca719a
sbc: regex maps, flexible active profile selection
...
- regex maps are files with regex=>value entries which,
once loaded, can be used with $M(key=>mapname) pattern replacement
- it is now possible to use replacements in active_profile, and
also a list of profiles can be specified here - the first matching
will be used
15 years ago
Stefan Sayer
ea94576e03
removed cAmElCase in AmUtils
15 years ago
Stefan Sayer
c346e0e270
moved regex mapping file reading to AmUtils
15 years ago
Stefan Sayer
bdc30b757a
b/f: unsigned int2str function save for big ones
15 years ago
Stefan Sayer
93a5978f38
add MD5 hash generation of file to configreader
15 years ago
Stefan Sayer
932510b94a
str2int, str2long and long2str methods
...
str2int is str2i with proper return code
str2long and long2str work on long
15 years ago
Stefan Sayer
252e4659e0
fix int2str for negative numbers
15 years ago
Raphael Coeffic
08f6326ac2
avoid to copy the string even if solaris defines getenv to need a char* argument.
16 years ago
Stefan Sayer
107a0aa3b3
fix get_header_keyvalue for keys length 1
16 years ago
Stefan Sayer
42f6589f02
work around getenv requiring char*
16 years ago
Stefan Sayer
7dcb7e2abb
added OpenSSL linking exception to license
16 years ago
Stefan Sayer
1e3f874833
core: fixing get_header_keyvalue. issue 0000024
...
https://bugtracker.iptel.org/view.php?id=24
16 years ago
Stefan Sayer
0bcdd93bcf
core: fixes on getHeader and get_header_keyvalue
...
fixes problems when values were at the end of the message/header
16 years ago
Stefan Sayer
77853863ab
getHeader:support content spanning multipe headers
...
Patch by Robert Szokovacs
16 years ago
Stefan Sayer
5dc1635495
removed using ntop instead of ntoa to get rid of mutex (ref r30374:30377)
...
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1789 8eb893ce-cfd4-0310-b710-fb5ebe64c474
16 years ago
Raphael Coeffic
00aa71fad7
- moved sipctrl plug-in into the core (core/sip).
...
- static library sip_stack.a (with dependencies on the core).
- removed AmServer and moved SipCtrlInterface into the core directory.
- TODO:
- CMake support to make core/sip/sip_stack.a and link against it in the core.
- merge AmSipRequest/AmSipReply and sip_msg structures.
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1758 8eb893ce-cfd4-0310-b710-fb5ebe64c474
16 years ago
Stefan Sayer
817d4d8f31
removed unused function (unixsockctrl gone some time ago)
...
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1634 8eb893ce-cfd4-0310-b710-fb5ebe64c474
16 years ago
Stefan Sayer
1a8977e08f
warn if rng could not be initialized (and make compiler happy)
...
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1628 8eb893ce-cfd4-0310-b710-fb5ebe64c474
16 years ago
Peter Lemenkov
7b6021c4f9
Fix for gcc4.4 in core/AmUtils.cpp
...
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1576 8eb893ce-cfd4-0310-b710-fb5ebe64c474
16 years ago
Stefan Sayer
7f30a69973
replaced explode() function with a more efficient version
...
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1556 8eb893ce-cfd4-0310-b710-fb5ebe64c474
16 years ago
Stefan Sayer
9f3e47a756
better double representation in AmArg::print
...
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1429 8eb893ce-cfd4-0310-b710-fb5ebe64c474
17 years ago
Stefan Sayer
fc6318504f
also consider %2E as extension delimiter (e.g. for cached files saved as urlencoded)
...
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1399 8eb893ce-cfd4-0310-b710-fb5ebe64c474
17 years ago
Stefan Sayer
487e68373c
fix for compilation on solaris (?)
...
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1290 8eb893ce-cfd4-0310-b710-fb5ebe64c474
17 years ago
Stefan Sayer
6dcd9e5c29
fix: reject streams in SDP answer that we don't support/want
...
reject streams offered with port 0 aswell
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@1226 8eb893ce-cfd4-0310-b710-fb5ebe64c474
17 years ago
Stefan Sayer
e1cb541170
get_header_keyvalue function with short name alternative
...
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@838 8eb893ce-cfd4-0310-b710-fb5ebe64c474
18 years ago
Stefan Sayer
e33cc4c778
enabling single character app-params
...
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@832 8eb893ce-cfd4-0310-b710-fb5ebe64c474
18 years ago
Raphael Coeffic
ced65a09c5
added support for single quoting of application parameters.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@816 8eb893ce-cfd4-0310-b710-fb5ebe64c474
18 years ago
Mikkel Liisberg
ff075f58de
NEW SDP parser, have fun :D (and test...)
...
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@791 8eb893ce-cfd4-0310-b710-fb5ebe64c474
18 years ago
Stefan Sayer
d751f7289f
fixed parsing of received replies into headers and body
...
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@767 8eb893ce-cfd4-0310-b710-fb5ebe64c474
18 years ago
Stefan Sayer
7f1afaaaf6
removed crlf2lf conversion in unixsocket module, and lf2crlf conversion back
...
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@761 8eb893ce-cfd4-0310-b710-fb5ebe64c474
18 years ago
Richard Newman
7b3563b882
Use populate_sockaddr_in_from_name instead of inet_aton: this ensures that c= fields with FQDNs are handled correctly.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@744 8eb893ce-cfd4-0310-b710-fb5ebe64c474
18 years ago
Raphael Coeffic
782bdebe93
- fixed old header parsing functions: added support for '\r\n'.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@727 8eb893ce-cfd4-0310-b710-fb5ebe64c474
18 years ago
Stefan Sayer
1f8fa7d86a
typo...
...
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@679 8eb893ce-cfd4-0310-b710-fb5ebe64c474
18 years ago
Stefan Sayer
644fd9fa30
fixing small start-up memleak
...
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@678 8eb893ce-cfd4-0310-b710-fb5ebe64c474
18 years ago
Raphael Coeffic
80461b82c6
- adds the new SASI interface
...
- splits the interface to the outer world from the core:
- use binrpcctrl plugin for SASI interface, or
- unixsockctrl for the good old unix socket interface.
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@568 8eb893ce-cfd4-0310-b710-fb5ebe64c474
18 years ago
Raphael Coeffic
6929eaca89
- aligned Makefiles with standard variable names (CC,CXX, CCFLAGS, CXXFLAGS, etc..)
...
- added support for nslu2 (armv5te)
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@458 8eb893ce-cfd4-0310-b710-fb5ebe64c474
19 years ago
Stefan Sayer
df041a16ed
train ride doxygen documentation
...
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@457 8eb893ce-cfd4-0310-b710-fb5ebe64c474
19 years ago
Stefan Sayer
a1d2158b6f
codec order priority patch ba juha.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@315 8eb893ce-cfd4-0310-b710-fb5ebe64c474
19 years ago