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

Function msg_list_set_flag

modules/msilo/ms_msg_list.c:216–245  ·  view source on GitHub ↗

* set flag for message with mid */

Source from the content-addressed store, hash-verified

214 * set flag for message with mid
215 */
216int msg_list_set_flag(msg_list ml, int mid, int fl)
217{
218 msg_list_el p0;
219
220 if(ml==0 || mid==0)
221 {
222 LM_ERR("bad param %p / %d\n", ml, fl);
223 goto errorx;
224 }
225
226 lock_get(&ml->sem_sent);
227
228 p0 = ml->lsent;
229 while(p0)
230 {
231 if(p0->msgid==mid)
232 {
233 p0->flag |= fl;
234 LM_DBG("mid:%d fl:%d\n", p0->msgid, fl);
235 goto done;
236 }
237 p0 = p0->next;
238 }
239
240done:
241 lock_release(&ml->sem_sent);
242 return MSG_LIST_OK;
243errorx:
244 return MSG_LIST_ERR;
245}
246
247/**
248 * check if the messages from list were sent

Callers 3

m_dumpFunction · 0.85
m_tm_callbackFunction · 0.85
m_send_ontimerFunction · 0.85

Calls 2

lock_getFunction · 0.85
lock_releaseFunction · 0.85

Tested by

no test coverage detected