[sr-dev] git:master:e5efcbdd: msilo: skip invalid stored records
Daniel-Constantin Mierla
miconda at gmail.com
Tue May 3 19:20:26 CEST 2022
Module: kamailio
Branch: master
Commit: e5efcbdd7be9897cf169b28a7a52c45bff24cac3
URL: https://github.com/kamailio/kamailio/commit/e5efcbdd7be9897cf169b28a7a52c45bff24cac3
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at 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/e5efcbdd7be9897cf169b28a7a52c45bff24cac3.diff
Patch: https://github.com/kamailio/kamailio/commit/e5efcbdd7be9897cf169b28a7a52c45bff24cac3.patch
---
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;
More information about the sr-dev
mailing list