Module: kamailio
Branch: 5.3
Commit: 64c92f2bbb9739725256d0b6dd5ceb47fe2688ea
URL:
https://github.com/kamailio/kamailio/commit/64c92f2bbb9739725256d0b6dd5ceb4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-02-25T08:40:51+01:00
usrloc: log database table if use_table() fails
(cherry picked from commit 3843ae18599bfc1806ccb62df44bbc8ad41d60dd)
---
Modified: src/modules/usrloc/ucontact.c
---
Diff:
https://github.com/kamailio/kamailio/commit/64c92f2bbb9739725256d0b6dd5ceb4…
Patch:
https://github.com/kamailio/kamailio/commit/64c92f2bbb9739725256d0b6dd5ceb4…
---
diff --git a/src/modules/usrloc/ucontact.c b/src/modules/usrloc/ucontact.c
index fe04d2af3d..45ab20f728 100644
--- a/src/modules/usrloc/ucontact.c
+++ b/src/modules/usrloc/ucontact.c
@@ -666,7 +666,13 @@ int db_insert_ucontact(ucontact_t* _c)
}
if (ul_dbf.use_table(ul_dbh, _c->domain) < 0) {
- LM_ERR("sql use_table failed\n");
+ if(_c->domain) {
+ LM_ERR("sql use_table failed for: %.*s\n",
+ (_c->domain->s)?_c->domain->len:0,
+ (_c->domain->s)?_c->domain->s:"");
+ } else {
+ LM_ERR("sql use_table failed - null\n");
+ }
return -1;
}