Module: kamailio
Branch: master
Commit: 80406a0f44b0d452ebb4b40a10261e671b8013c8
URL:
https://github.com/kamailio/kamailio/commit/80406a0f44b0d452ebb4b40a10261e6…
Author: jaybeepee <jason.penton(a)gmail.com>
Committer: jaybeepee <jason.penton(a)gmail.com>
Date: 2016-02-29T14:21:25+02:00
modules/ims_usrloc_scscf: don't load empty scscf contacts from DB
---
Modified: modules/ims_usrloc_scscf/usrloc_db.c
---
Diff:
https://github.com/kamailio/kamailio/commit/80406a0f44b0d452ebb4b40a10261e6…
Patch:
https://github.com/kamailio/kamailio/commit/80406a0f44b0d452ebb4b40a10261e6…
---
diff --git a/modules/ims_usrloc_scscf/usrloc_db.c b/modules/ims_usrloc_scscf/usrloc_db.c
index 6e4890d..2b37434 100644
--- a/modules/ims_usrloc_scscf/usrloc_db.c
+++ b/modules/ims_usrloc_scscf/usrloc_db.c
@@ -841,6 +841,14 @@ int preload_udomain(db1_con_t* _c, udomain_t* _d) {
contact.s = (char*) VAL_STRING(contact_vals);
contact.len = strlen(contact.s);
}
+
+ if (contact.len <=0 || !contact.s){
+ LM_ERR("Unable to insert contact [%.*s] for IMPU
[%.*s] into memory... continuing...\n",
+ contact.len, contact.s,
+ impu.len, impu.s);
+ continue;
+ }
+
if (dbrow2contact(contact_vals, &contact_data) != 0) {
LM_ERR("unable to convert contact row from DB into valid data... moving
on\n");
continue;