* TM callback function - delete message from database if was sent OK */
| 1085 | * TM callback function - delete message from database if was sent OK |
| 1086 | */ |
| 1087 | void 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 | |
| 1112 | done: |
| 1113 | return; |
| 1114 | } |
| 1115 | |
| 1116 | void m_send_ontimer(unsigned int ticks, void *param) |
| 1117 | { |
nothing calls this directly
no test coverage detected