Module: kamailio
Branch: master
Commit: 08ac68485a27db18ae4774baff0734492f617c71
URL:
https://github.com/kamailio/kamailio/commit/08ac68485a27db18ae4774baff07344…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-07-02T08:54:51+02:00
imc: proper condition on empty db result
---
Modified: src/modules/imc/imc.c
---
Diff:
https://github.com/kamailio/kamailio/commit/08ac68485a27db18ae4774baff07344…
Patch:
https://github.com/kamailio/kamailio/commit/08ac68485a27db18ae4774baff07344…
---
diff --git a/src/modules/imc/imc.c b/src/modules/imc/imc.c
index 668f8a6140..8876b248a1 100644
--- a/src/modules/imc/imc.c
+++ b/src/modules/imc/imc.c
@@ -236,7 +236,7 @@ int add_from_db(void)
goto error;
}
- if(m_res && m_res->n <=0)
+ if(m_res==NULL || m_res->n<=0)
{
LM_INFO("the query returned no result\n");
er_ret = 0;
@@ -849,4 +849,4 @@ int mod_register(char *path, int *dlflags, void *p1, void *p2)
{
sr_kemi_modules_add(sr_kemi_imc_exports);
return 0;
-}
\ No newline at end of file
+}