Richard Fuchs
df772840b3
MT#62181 rename uint128ToStr to int2str
...
Adds another overload
Change-Id: Id873959e1850533674e95dc6ddf2479031779220
4 months ago
Richard Fuchs
5810370c1d
MT#62181 rename longlong2str to int2str
...
Adds another overload
Change-Id: I1ad57862a7dbe96ec3cd327fa0dd74850bd0bc1a
4 months ago
Richard Fuchs
c4c1634cf1
MT#62181 rename long2str to int2str
...
Adds another overload
Change-Id: I2c25fa593c235ceb407aee0d7973572ebb90f3cd
4 months ago
Richard Fuchs
0374fb95b7
MT#62181 add unsigned long overload for int2str
...
Needed to avoid ambiguity with the `long` overload
Change-Id: I67a1e2c58f52bbfc867d82613272366daeb41b2a
4 months ago
Richard Fuchs
5aba17a359
MT#62181 unify all int-to-string conversions
...
Use a template to cover all signed- and unsigned- int-to-string
conversions. Based on a quick benchmark, this is the fastest alternative
(faster than sprintf and faster than using div/abs).
Change existing wrapper functions to use this template and let the
compiler optimise.
Change-Id: Id0512d0777407c8be442de0920f45d0751132ced
4 months ago
Richard Fuchs
74f01509e3
MT#62181 replace ull2str
...
with an overload of int2str and remove redundant previous overload and
wrapper function
Change-Id: I195d1ad2d12ff2f8f8f69cd4e374fe528edf4f6e
4 months ago
Donat Zenichev
d69d4961fa
MT#59962 AmUtils: add string to double conversion
...
Add support for floating types.
Change-Id: I75ee2ff1a6f545a7a3cd2f27014029ca9880d207
6 months ago
Richard Fuchs
b7abe78e5e
MT#62181 std::move updates
...
Avoid making needless copies
Change-Id: I51a2a6a05e25553dc55845fc03ce8ffee3c4287b
Warned-by: Coverity
1 year ago
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
1 year 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.
16 years ago
Raphael Coeffic
fbd68ba85e
b/f: added name support for get_local_addr_for_dest().
16 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
16 years ago
Stefan Sayer
4ab3f7cca9
fix compilation (used 'separator')
16 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
16 years ago
Stefan Sayer
ea94576e03
removed cAmElCase in AmUtils
16 years ago
Stefan Sayer
c346e0e270
moved regex mapping file reading to AmUtils
16 years ago
Stefan Sayer
bdc30b757a
b/f: unsigned int2str function save for big ones
16 years ago
Stefan Sayer
93a5978f38
add MD5 hash generation of file to configreader
16 years ago
Stefan Sayer
932510b94a
str2int, str2long and long2str methods
...
str2int is str2i with proper return code
str2long and long2str work on long
16 years ago
Stefan Sayer
252e4659e0
fix int2str for negative numbers
16 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
17 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
17 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
17 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
17 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
18 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
18 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
19 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
19 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
19 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
19 years ago