Richard Fuchs
b805252b94
MT#55283 fix zero string length after copy
Big yikes.
Closes #1878
Change-Id: Id2d2a337a145b8fbf2a515154bf009a085300904
1 year ago
Richard Fuchs
643547377f
MT#61352 consolidate opmode with ng_command
There is enough overlap between the two enums that it doesn't make sense
to carry along both. Unify.
Change-Id: I9de8fbdb8d78a2002d8c1b62cea57188c937d61d
1 year ago
Richard Fuchs
59ac21ceb0
MT#55283 fix possible null dereference
`local_ep` can end up as NULL. Don't try to send to Homer without it.
Change-Id: Ie4055034f60749f454feeb674cc080c8089ac913
Warned-by: Coverity
1 year ago
Richard Fuchs
dd91961aeb
MT#55283 add STR_PTR macro
Convenience wrapper for &STR()
This is useful so that STR() and STR_DUP() can be extended to avoid
duplicate expansion of its macro arguments.
Change-Id: Ieae170807c11b0cdd8b52fac9bab98dccdc2b951
1 year ago
Donat Zenichev
65c96da6ae
MT#60476 Deprecate chopper related functionality
Deprecate the chopper and related functionality:
- copy_up_to_end_of()
- copy_up_to()
- copy_up_to_ptr()
- copy_remainder()
- skip_over()
- chopper_append_str()
- chopper_append_c()
- chopper_append()
- chopper_replace
- chopper_append_printf()
- sdp_chopper_new()
- sdp_chopper_destroy()
- sdp_chopper_destroy_ret()
Deprecate the chopper structure itself:
- `struct sdp_chopper`
Deprecate other usages of this struct:
- `ng_buffer->chopper`
Change-Id: I3bff8aaf24c6513ccd9fb3806474d8edac6eb866
1 year ago
Richard Fuchs
98d6575c63
MT#55283 add (un)escape parser methods
Change-Id: I7d9be892c4b5a3e28b77bc4a42e4c0cee722a132
1 year ago
Richard Fuchs
7dd2235df1
MT#55283 rework parser framework
Change-Id: Ia837916ec2123afe03e63c62bfb7058173f05fad
1 year ago
Richard Fuchs
81a7d177ef
MT#55283 use abstract JSON writer for Redis
Change-Id: Ib667184773d75c5187d6029ca2e9282e7931c5a4
1 year ago
Richard Fuchs
ef787fb119
MT#55283 use abstract parser for Redis restore
Change-Id: Ic4b61bee33b71a759b5a352393e2bc2738d87b86
1 year ago
Richard Fuchs
a56577adb4
MT#55283 rework dict_iter
Change-Id: I2d13eeea4df474639779e7be1a7b6aecd58db941
1 year ago
Richard Fuchs
5aa8e56798
MT#55283 rework parser context passing
Change-Id: I1ccab431314ff6b3fcb3dea74f26dbd88b9b9307
1 year ago
Richard Fuchs
96d6e438cf
MT#55283 add strdup method
Change-Id: Icf26f301895c94d789902d422cb7907ef3b6025f
1 year ago
Richard Fuchs
dbd48293ec
MT#55283 remove obsolete feature
Change-Id: I8bc2d99c1cf93f52d75592cc73d1da65d87d35ed
1 year ago
Richard Fuchs
4d0c97b40e
MT#55283 native JSON writer
Change-Id: Ic13c126456cd5ebacac9541424b6d6d42825eeae
1 year ago
Richard Fuchs
0cc7f3ba44
MT#55283 extend parser_arg to return types
Requires boilerplate wrapper functions :(
Change-Id: Ice6b0bb055082fb2c8893ec9a57488f56c0218c3
1 year ago
Richard Fuchs
93653fe562
MT#55283 add .dict_add_dict_dup method
Change-Id: I9942965d7579a3d3a00147ef185c183ad0ea93c4
1 year ago
Richard Fuchs
8aba2b3e6f
MT#55283 add *list_add_str_dup method
Change-Id: Ic6dac373f9fb16a83e20d12ff7f05d272633e859
1 year ago
Richard Fuchs
671c163a60
MT#55283 add dict_contains() method
Change-Id: I908075e8e3ef9578abc426987e34c9d776203184
1 year ago
Richard Fuchs
cbfe44aeb4
MT#55283 add native JSON parser
Change-Id: Ib6adf8adbd3a14797932687c605395fdb20003fe
1 year ago
Richard Fuchs
baf3cc97f2
MT#55283 extend use of parser_arg
Change-Id: I4e5b1fbb4d921fd75c50d5ffd8ec81afe200962c
1 year ago
Richard Fuchs
416f658088
MT#55283 introduce parser_arg union
Generic "item" object to represent some entity within a signalling
message
Change-Id: Ie1a7f2acaf954b86597ac32af3f0546d68f9e687
1 year ago
Richard Fuchs
6c8a5ec99a
MT#55283 add extra methods
Change-Id: If6aa0894c92b276b005d19a67f72bf59539354aa
1 year ago
Richard Fuchs
b7d5e00d65
MT#55283 add pretty_print method
Change-Id: Ibcc16385f9a988b949ead2f544732474b87e3a2c
1 year ago
Richard Fuchs
c437c0a706
MT#55283 add is_dict method
Change-Id: I53068670f20bfae642577c078f7f73b97cf7eea7
1 year ago
Richard Fuchs
c18904d8db
MT#55283 reduce usage of bencode_buffer_destroy_add
Change-Id: I913f7df30d2dba46d6e44db74f55c43a2cd98444
1 year ago
Richard Fuchs
bdd66fe730
MT#55283 move JsonParser into ngbuf
Use ngbuf's free function to destroy the JSON parser instead of the
callback for the bencode_buffer object.
Change-Id: I7eccf7284f55b34ef1a4800017ea1a4519f42bbc
1 year ago
Richard Fuchs
b1a0aebab5
MT#55283 add abstract .dict_add_str_dup
Change-Id: I8b5e34379e49819f5050e3460e4398706fe20749
1 year ago
Richard Fuchs
8f6b8b206b
MT#55283 add abstract dict_add/list/list_add
Change-Id: Id0cfcfa1504135473b7e4d355bfe5e28d089a6d1
1 year ago
Richard Fuchs
2f82805f1d
MT#55283 add abstract .dict_add_int()
Change-Id: If3f84b11d6c0399b6d9c916f3956877af9ec22d0
1 year ago
Richard Fuchs
271c646d8d
MT#55283 add abstract .list_add_string()
Change-Id: I487a5c535fc5ccd0b409a6abbcf6ba05b1e63f49
1 year ago
Richard Fuchs
a1e01c6025
MT#55283 add abstract .list_add_dict()
Change-Id: I4dfc8c5a52ad9a8df3683788297d73cff0504fd4
1 year ago
Richard Fuchs
5ccdb6c804
MT#55283 add abstract .dict_add_list()
Change-Id: I6e4530701c760101fd4a07c220d7bf85119cf876
1 year ago
Richard Fuchs
af3459b85e
MT#55283 add abstract .dict_add_dict()
Change-Id: Ie942d6a43e070edc08cb4124d19f8ce54a164351
1 year ago
Richard Fuchs
24fbb4d8c0
MT#55283 add abstract .dict_add_str()
Change-Id: I996f92c81366741aa0207a74c825a3033db59d22
1 year ago
Richard Fuchs
dc19d892cd
MT#55283 add abstract .dict_add_string()
Change-Id: I33eb89241eaa8b29e2ea128bb5c9d34bc25be0e9
1 year ago
Richard Fuchs
a2c89d64df
MT#55283 add abstract dict_get_str()
Change-Id: Ibb453a18913803042ee0074cbfd5d4c19c30418b
1 year ago
Richard Fuchs
cc43740ce0
MT#55283 add abstract dict() method
Change-Id: I305f1fc3e4cab7961ca4d38c35fb8359c3a63856
1 year ago
Richard Fuchs
425a3332b9
MT#55283 add bool return to dict_iter
to indicate success
Change-Id: Iaeaa41262a60d039b1e2d4b7ad2d30bb6c565c13
1 year ago
Richard Fuchs
2f367bf84a
MT#55283 add helper_arg to dict_iter
Change-Id: I0344a74c1d653a42b524612149857845b9815952
1 year ago
Richard Fuchs
ad1e051cb3
MT#55283 add get_int() method
Change-Id: I407783faac30bc911dafb7e69a73f0c52701cce5
1 year ago
Richard Fuchs
d007d9733a
MT#55283 add is_int() method
Change-Id: Ibcb1d1be415e85967eb5f3f87b91d79fa78eb4bb
1 year ago
Richard Fuchs
f50d5e7482
MT#55283 add list iteration method
Change-Id: Ib533a9faa942a12006271ec95dabe7e3cbdc0b9d
1 year ago
Richard Fuchs
a91bfc34e3
MT#55283 add abstract string/int parsing methods
Change-Id: I8acf3c1540a68ec2244a4a7768832855fed7937b
1 year ago
Richard Fuchs
f0eee2a75e
MT#55283 add abstract dictionary iterator
Change-Id: Ic41b41e533ffddda5c37ad5ea6155faa0100cada
1 year ago
Richard Fuchs
3f8f182119
MT#55283 introduce abstract parsing framework
Change-Id: I63ba6fc7e6278e989e87a3abdb66976084b403bc
1 year ago
Richard Fuchs
a2ee38ac44
MT#55283 rename STR_CONST_INIT...
... to STR_CONST...() for consistency
no-op
Change-Id: I68da3d1a80b9d6db69adba1091e58cc4909305ca
1 year ago
Richard Fuchs
e553660e23
MT#55283 virtualise poller methods
This allows us to use other poller implementations
Change-Id: Iac7c194c86ecaac550aae4baa047cab205c507b9
2 years ago
Richard Fuchs
58cbd2f21c
MT#55283 delegate closing sockets to poller
To support asynchronous pollers which may hold references on underlying
sockets, let the poller close the socket after it has released its
references. This prevents cases of file descriptor re-use while an
underlying socket is still open.
Add reset_socket() to be used in place of close_socket() which does the
same thing except the actual closing of the socket.
Add poller_del_item_callback() for cases where more action than just
closing the file descriptor is needed.
Change-Id: Iefda1487ecb89263729120ecb964436dd79b2a0e
2 years ago
Lucian Balaceanu
7905811c53
MT#55283 Adding support for NG trace to Homer
Support is desired for Kamailio/Rtpengine traffic via UDP.
Adding homer-disable-rtcp-stats and homer-enable-ng config params to
separately control sending to Homer each traffic type. By default rtcp
is `on` when homer parameter is configured. NG is by default disabled.
closes #1802
Change-Id: Ib68fb133cffc5d8945f9b6bf60bab3e80fab9630
2 years ago
Donat Zenichev
36c19b9111
MT#58535 rtpp_flags: introduce raw flags parsing
Add support of rtpp_flags parsing for the daemon.
From now on, it's possible to parse option flags
on the daemon side instead of the kamailio module.
It's identical to what the module does, but the
difference is:
- module sends general call identification such as:
call-id, From/To tags, viabranch using bencode
- meanwhile all generic/non-generic option flags
are added to the `rtpp_flags` bencode member as str
- parsing of that is done as usually using the
`call_ng_main_flags()` / `call_ng_flags_flags()`
and additionally using new parser `parse_rtpp_flags()`
New file implementation and header introduced:
- control_ng_flags_parser.c
- control_ng_flags_parser.h
Otherwise no functional changes, and the parsing itself
remains working following the same algorithm.
Change-Id: I59e47fa1947e2aeaa0bbf3930a0f21d9a6d669ad
2 years ago