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

Function m_send_ontimer

modules/msilo/msilo.c:1116–1270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1114}
1115
1116void m_send_ontimer(unsigned int ticks, void *param)
1117{
1118 db_key_t db_keys[2];
1119 db_op_t db_ops[2];
1120 db_val_t db_vals[2];
1121 db_key_t db_cols[6];
1122 db_res_t* db_res = NULL;
1123 int i, db_no_cols = 6, db_no_keys = 2, mid, n;
1124 static char hdr_buf[1024];
1125 static char uri_buf[1024];
1126 static char body_buf[1024];
1127 unsigned int mime;
1128 char cbuf[26], *p;
1129 str puri;
1130 time_t ttime;
1131
1132 str str_vals[4], hdr_str , body_str;
1133 time_t stime;
1134
1135 if(ms_reminder.s==NULL)
1136 {
1137 LM_WARN("reminder address null\n");
1138 return;
1139 }
1140
1141 /* init */
1142 db_keys[0]=&sc_snd_time;
1143 db_keys[1]=&sc_snd_time;
1144 db_ops[0]=OP_NEQ;
1145 db_ops[1]=OP_LEQ;
1146
1147 db_cols[0]=&sc_mid;
1148 db_cols[1]=&sc_uri_user;
1149 db_cols[2]=&sc_uri_host;
1150 db_cols[3]=&sc_body;
1151 db_cols[4]=&sc_ctype;
1152 db_cols[5]=&sc_snd_time;
1153
1154
1155 LM_DBG("------------ start ------------\n");
1156 hdr_str.s=hdr_buf;
1157 hdr_str.len=1024;
1158 body_str.s=body_buf;
1159 body_str.len=1024;
1160
1161 db_vals[0].type = DB_INT;
1162 db_vals[0].nul = 0;
1163 db_vals[0].val.int_val = 0;
1164
1165 db_vals[1].type = DB_INT;
1166 db_vals[1].nul = 0;
1167 ttime = time(NULL);
1168 db_vals[1].val.int_val = (int)(unsigned long)ttime;
1169
1170 if (msilo_dbf.use_table(db_con, &ms_db_table) < 0)
1171 {
1172 LM_ERR("failed to use_table\n");
1173 return;

Callers

nothing calls this directly

Calls 5

msg_list_check_msgFunction · 0.85
m_build_headersFunction · 0.85
msg_list_set_flagFunction · 0.85
decode_mime_typeFunction · 0.85
m_build_bodyFunction · 0.85

Tested by

no test coverage detected