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

Function get_b2be_map_key

modules/b2b_entities/b2be_db.c:151–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151static inline str *get_b2be_map_key(int type, str *tag0, str *tag1, str *callid)
152{
153 static str key = {0,0};
154 int len = 3/*3 x '$'*/ + 1 /*type*/ + cdb_key_prefix.len +
155 tag0->len + tag1->len + callid->len + 1;
156
157 /* map key format: [prefix][type]$[tag0]$[tag1]$[callid] */
158 key.s = pkg_malloc(len);
159 if (!key.s) {
160 LM_ERR("no more pkg memory\n");
161 return NULL;
162 }
163
164 key.len = snprintf(key.s, len, "%.*s%d$%.*s$%.*s$%.*s",
165 cdb_key_prefix.len, cdb_key_prefix.s, type, tag0->len, tag0->s,
166 tag1->len, tag1->s, callid->len, callid->s);
167
168 return &key;
169}
170
171static inline str *get_b2be_map_subkey(str *param)
172{

Callers 3

b2be_cdb_insertFunction · 0.85
b2b_entity_cdb_deleteFunction · 0.85
b2be_cdb_updateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected