Richard Fuchs
e92f260e7a
MT#55283 convert daemon/ to int64_t
...
Change-Id: Ie557204821fddfa5af0be96cc8f0ff2dd093fc7c
2 weeks ago
Richard Fuchs
8b50a41063
MT#55283 convert homer to int64_t
...
Change-Id: Id3cb59aa72d0271e3e93c339211f9bb9deb4a222
2 weeks ago
Richard Fuchs
2b81650b13
MT#55283 convert ng_command_stats to int64_t
...
Change-Id: Iab5acb85dc2b857ffc3d4cbe8128a58907474c8f
2 weeks ago
Richard Fuchs
c70510303a
MT#55283 convert rtpe_now to int64_t
...
First step in converting (almost) all timeval uses to int64_t
Change-Id: If20fd749c61c278273c535b68287df7e6f042808
2 weeks ago
Richard Fuchs
4d8156bf91
MT#55283 remove remnants of g_slice
...
The GLib slice allocator has been obsoleted. Having a mixture of two
allocators can lead to hidden issues on systems that use different
implementations. Take the leap and replace everything with g_new/g_free.
Change-Id: I025c8383ef47b2c2472573360407fd6a6ca339b3
3 weeks ago
Richard Fuchs
135a95ef02
MT#61625 implement "transform" method
...
Change-Id: I2113b76d97f5cf6cc8927f92b8a178795322a77e
1 month ago
Richard Fuchs
21de8d4b94
MT#55283 modernise timeval_subtract
...
Change-Id: I7715ee92e12e88d69e3f714a6714f691646e240c
3 months ago
Richard Fuchs
89abf47989
MT#55283 use timeval_subtract
...
Change-Id: I91174702dac50c05725a5e3b62bdeae5f7db9c32
3 months ago
Richard Fuchs
4947ab9404
MT#55283 modernise timeval_add
...
Change-Id: I16a368dc66e632d43f01f9e674ad9637a0c18370
3 months ago
Richard Fuchs
9673703476
MT#61822 add new "CLI" NG command
...
Change-Id: Idd4114783b1bb6cc683970110a2f322ec07b894a
4 months ago
Richard Fuchs
bd440dcdcb
MT#55283 use enum ng_opmode
...
Change-Id: Ic511765a87faf53d9b8afd4a216bfcb1755f5c5e
4 months ago
Richard Fuchs
3692ad098d
MT#55283 change string allocation semantics
...
Change old code to directly return `str` objects instead of pointers to
allocated ones. Largely a no-op change but makes some code easier and
eliminates some old kludges.
Change-Id: I2be19dd24bb7ff046d86cc32a3af235283e65dd0
4 months ago
Richard Fuchs
2ce79f9bb4
MT#61822 add type safety to obj_alloc
...
Make the macro return the appropriate pointer type, and make sure the
free function takes an argument of the same type. This also eliminates
some boilerplate type-casting code.
Change-Id: I3094271fa2c53ec93b9ff9f837d461cf422e0f12
4 months ago
Richard Fuchs
3af3e799a8
MT#61368 add OP_CONNECT
...
Change-Id: Ie07cb5bd139f5e039c5736009ae18733850b0c55
4 months ago
Richard Fuchs
67141a517b
MT#61368 avoid opmode redundancy
...
The opmode is already determined uniquely when processing the NG
command. There is no need to explicitly set it again elsewhere. Simply
carry along the originally determined opmode.
Change-Id: I16924264b0337423aff6763c70a4b2c6dd3687db
5 months ago
Richard Fuchs
b805252b94
MT#55283 fix zero string length after copy
...
Big yikes.
Closes #1878
Change-Id: Id2d2a337a145b8fbf2a515154bf009a085300904
5 months 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
5 months 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
7 months 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
7 months 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
7 months ago
Richard Fuchs
98d6575c63
MT#55283 add (un)escape parser methods
...
Change-Id: I7d9be892c4b5a3e28b77bc4a42e4c0cee722a132
8 months ago
Richard Fuchs
7dd2235df1
MT#55283 rework parser framework
...
Change-Id: Ia837916ec2123afe03e63c62bfb7058173f05fad
9 months ago
Richard Fuchs
81a7d177ef
MT#55283 use abstract JSON writer for Redis
...
Change-Id: Ib667184773d75c5187d6029ca2e9282e7931c5a4
9 months ago
Richard Fuchs
ef787fb119
MT#55283 use abstract parser for Redis restore
...
Change-Id: Ic4b61bee33b71a759b5a352393e2bc2738d87b86
9 months ago
Richard Fuchs
a56577adb4
MT#55283 rework dict_iter
...
Change-Id: I2d13eeea4df474639779e7be1a7b6aecd58db941
9 months ago
Richard Fuchs
5aa8e56798
MT#55283 rework parser context passing
...
Change-Id: I1ccab431314ff6b3fcb3dea74f26dbd88b9b9307
9 months ago
Richard Fuchs
96d6e438cf
MT#55283 add strdup method
...
Change-Id: Icf26f301895c94d789902d422cb7907ef3b6025f
9 months ago
Richard Fuchs
dbd48293ec
MT#55283 remove obsolete feature
...
Change-Id: I8bc2d99c1cf93f52d75592cc73d1da65d87d35ed
9 months ago
Richard Fuchs
4d0c97b40e
MT#55283 native JSON writer
...
Change-Id: Ic13c126456cd5ebacac9541424b6d6d42825eeae
9 months ago
Richard Fuchs
0cc7f3ba44
MT#55283 extend parser_arg to return types
...
Requires boilerplate wrapper functions :(
Change-Id: Ice6b0bb055082fb2c8893ec9a57488f56c0218c3
9 months ago
Richard Fuchs
93653fe562
MT#55283 add .dict_add_dict_dup method
...
Change-Id: I9942965d7579a3d3a00147ef185c183ad0ea93c4
9 months ago
Richard Fuchs
8aba2b3e6f
MT#55283 add *list_add_str_dup method
...
Change-Id: Ic6dac373f9fb16a83e20d12ff7f05d272633e859
9 months ago
Richard Fuchs
671c163a60
MT#55283 add dict_contains() method
...
Change-Id: I908075e8e3ef9578abc426987e34c9d776203184
9 months ago
Richard Fuchs
cbfe44aeb4
MT#55283 add native JSON parser
...
Change-Id: Ib6adf8adbd3a14797932687c605395fdb20003fe
9 months ago
Richard Fuchs
baf3cc97f2
MT#55283 extend use of parser_arg
...
Change-Id: I4e5b1fbb4d921fd75c50d5ffd8ec81afe200962c
9 months ago
Richard Fuchs
416f658088
MT#55283 introduce parser_arg union
...
Generic "item" object to represent some entity within a signalling
message
Change-Id: Ie1a7f2acaf954b86597ac32af3f0546d68f9e687
9 months ago
Richard Fuchs
6c8a5ec99a
MT#55283 add extra methods
...
Change-Id: If6aa0894c92b276b005d19a67f72bf59539354aa
9 months ago
Richard Fuchs
b7d5e00d65
MT#55283 add pretty_print method
...
Change-Id: Ibcc16385f9a988b949ead2f544732474b87e3a2c
9 months ago
Richard Fuchs
c437c0a706
MT#55283 add is_dict method
...
Change-Id: I53068670f20bfae642577c078f7f73b97cf7eea7
9 months ago
Richard Fuchs
c18904d8db
MT#55283 reduce usage of bencode_buffer_destroy_add
...
Change-Id: I913f7df30d2dba46d6e44db74f55c43a2cd98444
9 months 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
9 months ago
Richard Fuchs
b1a0aebab5
MT#55283 add abstract .dict_add_str_dup
...
Change-Id: I8b5e34379e49819f5050e3460e4398706fe20749
9 months ago
Richard Fuchs
8f6b8b206b
MT#55283 add abstract dict_add/list/list_add
...
Change-Id: Id0cfcfa1504135473b7e4d355bfe5e28d089a6d1
9 months ago
Richard Fuchs
2f82805f1d
MT#55283 add abstract .dict_add_int()
...
Change-Id: If3f84b11d6c0399b6d9c916f3956877af9ec22d0
9 months ago
Richard Fuchs
271c646d8d
MT#55283 add abstract .list_add_string()
...
Change-Id: I487a5c535fc5ccd0b409a6abbcf6ba05b1e63f49
9 months ago
Richard Fuchs
a1e01c6025
MT#55283 add abstract .list_add_dict()
...
Change-Id: I4dfc8c5a52ad9a8df3683788297d73cff0504fd4
9 months ago
Richard Fuchs
5ccdb6c804
MT#55283 add abstract .dict_add_list()
...
Change-Id: I6e4530701c760101fd4a07c220d7bf85119cf876
9 months ago
Richard Fuchs
af3459b85e
MT#55283 add abstract .dict_add_dict()
...
Change-Id: Ie942d6a43e070edc08cb4124d19f8ce54a164351
9 months ago
Richard Fuchs
24fbb4d8c0
MT#55283 add abstract .dict_add_str()
...
Change-Id: I996f92c81366741aa0207a74c825a3033db59d22
9 months ago
Richard Fuchs
dc19d892cd
MT#55283 add abstract .dict_add_string()
...
Change-Id: I33eb89241eaa8b29e2ea128bb5c9d34bc25be0e9
9 months ago