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

Function dm_remove_unreplied_req

modules/aaa_diameter/dm_impl.c:208–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206
207
208int dm_remove_unreplied_req(struct msg *req)
209{
210 struct list_head *it, *aux;
211 struct fd_msg_list *rit;
212
213 lock_get(&dm_unreplied_req_lk);
214
215 list_for_each_safe (it, aux, &dm_unreplied_req) {
216 rit = list_entry(it, struct fd_msg_list, list);
217
218 if (rit->req == req) {
219 list_del(&rit->list);
220 lock_release(&dm_unreplied_req_lk);
221 LM_DBG("matched unreplied req, removing from list\n");
222 pkg_free(rit);
223 return 0;
224 }
225 }
226
227 lock_release(&dm_unreplied_req_lk);
228 LM_DBG("failed to match unreplied req (already cleaned up?!)\n");
229 return -1;
230}
231
232
233static int dm_acc_reply(struct msg ** msg, struct avp * avp, struct session * sess, void * data, enum disp_action * act)

Callers 1

dm_send_custom_rplFunction · 0.85

Calls 5

lock_getFunction · 0.85
list_for_each_safeFunction · 0.85
list_delFunction · 0.85
lock_releaseFunction · 0.85
list_entryClass · 0.50

Tested by

no test coverage detected