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

Function m_tm_callback

modules/msilo/msilo.c:1087–1114  ·  view source on GitHub ↗

* TM callback function - delete message from database if was sent OK */

Source from the content-addressed store, hash-verified

1085 * TM callback function - delete message from database if was sent OK
1086 */
1087void m_tm_callback( struct cell *t, int type, struct tmcb_params *ps)
1088{
1089 if(ps->param==NULL || *ps->param==0)
1090 {
1091 LM_DBG("message id not received\n");
1092 goto done;
1093 }
1094
1095 LM_DBG("completed with status %d [mid: %ld/%d]\n",
1096 ps->code, (long)ps->param, *((int*)ps->param));
1097 if(!db_con)
1098 {
1099 LM_ERR("db_con is NULL\n");
1100 goto done;
1101 }
1102 if(ps->code >= 300)
1103 {
1104 LM_DBG("message <%d> was not sent successfully\n", *((int*)ps->param));
1105 msg_list_set_flag(ml, *((int*)ps->param), MS_MSG_ERRO);
1106 goto done;
1107 }
1108
1109 LM_DBG("message <%d> was sent successfully\n", *((int*)ps->param));
1110 msg_list_set_flag(ml, *((int*)ps->param), MS_MSG_DONE);
1111
1112done:
1113 return;
1114}
1115
1116void m_send_ontimer(unsigned int ticks, void *param)
1117{

Callers

nothing calls this directly

Calls 1

msg_list_set_flagFunction · 0.85

Tested by

no test coverage detected