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

Function bencode_strcmp

modules/rtpengine/bencode.h:512–522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

510 return out;
511}
512static inline int bencode_strcmp(bencode_item_t *a, const char *b) {
513 int len;
514 if (a->type != BENCODE_STRING)
515 return 2;
516 len = strlen(b);
517 if (a->iov[1].iov_len < len)
518 return -1;
519 if (a->iov[1].iov_len > len)
520 return 1;
521 return memcmp(a->iov[1].iov_base, b, len);
522}
523static inline int bencode_dictionary_get_strcmp(bencode_item_t *dict, const char *key, const char *str) {
524 bencode_item_t *i;
525 i = bencode_dictionary_get(dict, key);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected