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

Function __bencode_hash_insert

modules/rtpengine/bencode.c:460–476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

458}
459
460static void __bencode_hash_insert(bencode_item_t *key, struct __bencode_hash *hash) {
461 unsigned int bucket, i;
462
463 i = bucket = __bencode_hash_str(key);
464
465 while (1) {
466 if (!hash->buckets[i]) {
467 hash->buckets[i] = key;
468 break;
469 }
470 i++;
471 if (i >= BENCODE_HASH_BUCKETS)
472 i = 0;
473 if (i == bucket)
474 break;
475 }
476}
477
478static bencode_item_t *__bencode_decode_dictionary(bencode_buffer_t *buf, const char *s, const char *end) {
479 bencode_item_t *ret, *key, *value;

Callers 1

Calls 1

__bencode_hash_strFunction · 0.85

Tested by

no test coverage detected