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

Function __bencode_decode_list

modules/rtpengine/bencode.c:521–544  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

519}
520
521static bencode_item_t *__bencode_decode_list(bencode_buffer_t *buf, const char *s, const char *end) {
522 bencode_item_t *ret, *item;
523
524 if (*s != 'l')
525 return NULL;
526 s++;
527
528 ret = __bencode_item_alloc(buf, 0);
529 if (!ret)
530 return NULL;
531 __bencode_list_init(ret);
532
533 while (s < end) {
534 item = __bencode_decode(buf, s, end);
535 if (!item)
536 return NULL;
537 s += item->str_len;
538 if (item->type == BENCODE_END_MARKER)
539 break;
540 __bencode_container_add(ret, item);
541 }
542
543 return ret;
544}
545
546static bencode_item_t *__bencode_decode_integer(bencode_buffer_t *buf, const char *s, const char *end) {
547 long long int i;

Callers 1

__bencode_decodeFunction · 0.85

Calls 4

__bencode_item_allocFunction · 0.85
__bencode_list_initFunction · 0.85
__bencode_decodeFunction · 0.85
__bencode_container_addFunction · 0.85

Tested by

no test coverage detected