Module: kamailio
Branch: 4.4
Commit: 40b2b43e5919f05ef07f15a5f6802d83a2d1ddb6
URL:
https://github.com/kamailio/kamailio/commit/40b2b43e5919f05ef07f15a5f6802d8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-08-31T11:38:55+02:00
db_text: more details in log message when nr of columns is too small
(cherry picked from commit 2683b20d7b62f60ce53ed6692a42ed6b19fee972)
(cherry picked from commit 4e9921d78032a850ca07bd604aa388f73bc3256a)
---
Modified: modules/db_text/dbt_base.c
---
Diff:
https://github.com/kamailio/kamailio/commit/40b2b43e5919f05ef07f15a5f6802d8…
Patch:
https://github.com/kamailio/kamailio/commit/40b2b43e5919f05ef07f15a5f6802d8…
---
diff --git a/modules/db_text/dbt_base.c b/modules/db_text/dbt_base.c
index f0ad7139ec..e8b3d1fc1d 100644
--- a/modules/db_text/dbt_base.c
+++ b/modules/db_text/dbt_base.c
@@ -210,9 +210,10 @@ int dbt_query(db1_con_t* _h, db_key_t* _k, db_op_t* _op, db_val_t*
_v,
}
- if(!_tbc || _tbc->nrcols < _nc)
+ if(_tbc->nrcols < _nc)
{
- LM_ERR("table %s not loaded! (too few columns)\n", CON_TABLE(_h)->s);
+ LM_ERR("table %s - too few columns (%d < %d)\n", CON_TABLE(_h)->s,
+ _tbc->nrcols, _nc);
goto error;
}
if(_k)