| 169 | } |
| 170 | |
| 171 | static inline str *get_b2be_map_subkey(str *param) |
| 172 | { |
| 173 | static str subkey = {0,0}; |
| 174 | |
| 175 | /* subkey format: [prefix][param] */ |
| 176 | subkey.len = cdb_key_prefix.len + param->len; |
| 177 | subkey.s = pkg_malloc(subkey.len); |
| 178 | if (!subkey.s) { |
| 179 | LM_ERR("no more pkg memory\n"); |
| 180 | return NULL; |
| 181 | } |
| 182 | |
| 183 | memcpy(subkey.s, cdb_key_prefix.s, cdb_key_prefix.len); |
| 184 | memcpy(subkey.s + cdb_key_prefix.len, param->s, param->len); |
| 185 | |
| 186 | return &subkey; |
| 187 | } |
| 188 | |
| 189 | static int b2be_cdb_insert(int type, b2b_dlg_t* dlg, int cols_no) |
| 190 | { |
no outgoing calls
no test coverage detected