Module: kamailio
Branch: master
Commit: e5efcbdd7be9897cf169b28a7a52c45bff24cac3
URL:
https://github.com/kamailio/kamailio/commit/e5efcbdd7be9897cf169b28a7a52c45…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-05-03T19:19:52+02:00
msilo: skip invalid stored records
---
Modified: src/modules/msilo/msilo.c
---
Diff:
https://github.com/kamailio/kamailio/commit/e5efcbdd7be9897cf169b28a7a52c45…
Patch:
https://github.com/kamailio/kamailio/commit/e5efcbdd7be9897cf169b28a7a52c45…
---
diff --git a/src/modules/msilo/msilo.c b/src/modules/msilo/msilo.c
index 0bf53ecc5a..f7218bfa61 100644
--- a/src/modules/msilo/msilo.c
+++ b/src/modules/msilo/msilo.c
@@ -1406,6 +1406,10 @@ void m_send_ontimer(unsigned int ticks, void *param)
SET_STR_VAL(str_vals[0], db_res, i, 1); /* user */
SET_STR_VAL(str_vals[1], db_res, i, 2); /* host */
SET_STR_VAL(str_vals[2], db_res, i, 3); /* body */
+ if(str_vals[0].s==NULL || str_vals[1].s==NULL || str_vals[2].s==NULL) {
+ LM_DBG("message[%d] mid=%d has no user, host or body\n", i, mid);
+ continue;
+ }
SET_STR_VAL(str_vals[3], db_res, i, 4); /* ctype */
extra_hdrs_str.len = 0;