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

Function cdb_dict_fetch

cachedb/cachedb_dict.c:251–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249}
250
251cdb_pair_t *cdb_dict_fetch(const cdb_key_t *key, const cdb_dict_t *dict)
252{
253 struct list_head *_;
254 cdb_pair_t *pair;
255
256 if (!dict)
257 return NULL;
258
259 list_for_each (_, dict) {
260 pair = list_entry(_, cdb_pair_t, list);
261
262 if ((key->is_pk && pair->key.is_pk)
263 || str_match(&pair->key.name, &key->name))
264 return pair;
265 }
266
267 return NULL;
268}
269
270int dict_cmp(const cdb_dict_t *a, const cdb_dict_t *b)
271{

Callers 7

get_val_from_dictFunction · 0.85
get_val_from_dictFunction · 0.85
dict_cmpFunction · 0.85
cdb_dict_has_pairFunction · 0.85
test_query_unsetFunction · 0.85
test_map_getFunction · 0.85

Calls 2

str_matchFunction · 0.85
list_entryClass · 0.50

Tested by 2

test_query_unsetFunction · 0.68
test_map_getFunction · 0.68