MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / bencode_dictionary_add_len

Function bencode_dictionary_add_len

modules/rtpengine/bencode.c:298–311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296}
297
298bencode_item_t *bencode_dictionary_add_len(bencode_item_t *dict, const char *key, int keylen, bencode_item_t *val) {
299 bencode_item_t *str;
300
301 if (!dict || !val)
302 return NULL;
303 assert(dict->type == BENCODE_DICTIONARY);
304
305 str = bencode_string_len(dict->buffer, key, keylen);
306 if (!str)
307 return NULL;
308 __bencode_container_add(dict, str);
309 __bencode_container_add(dict, val);
310 return val;
311}
312
313bencode_item_t *bencode_list_add(bencode_item_t *list, bencode_item_t *item) {
314 if (!list || !item)

Callers 3

parse_bracket_valueFunction · 0.85
bencode_dictionary_addFunction · 0.85
parse_flagsFunction · 0.85

Calls 2

bencode_string_lenFunction · 0.85
__bencode_container_addFunction · 0.85

Tested by

no test coverage detected