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

Function __bencode_dictionary_key_match

modules/rtpengine/bencode.c:668–677  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

666
667
668static int __bencode_dictionary_key_match(bencode_item_t *key, const char *keystr, int keylen) {
669 assert(key->type == BENCODE_STRING);
670
671 if (keylen != key->iov[1].iov_len)
672 return 0;
673 if (memcmp(keystr, key->iov[1].iov_base, keylen))
674 return 0;
675
676 return 1;
677}
678
679bencode_item_t *bencode_dictionary_get_len(bencode_item_t *dict, const char *keystr, int keylen) {
680 bencode_item_t *key;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected