Module: kamailio
Branch: 4.2
Commit: bb81ec09e22bb35944879a081eba47b1cfcc816b
URL:
https://github.com/kamailio/kamailio/commit/bb81ec09e22bb35944879a081eba47b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-03-10T14:56:17+01:00
sqlops: more verbose log message if execution of query fails
(cherry picked from commit 941fbda5c66da6c8069b3bce3764249bbb58baaa)
---
Modified: modules/sqlops/sql_api.c
---
Diff:
https://github.com/kamailio/kamailio/commit/bb81ec09e22bb35944879a081eba47b…
Patch:
https://github.com/kamailio/kamailio/commit/bb81ec09e22bb35944879a081eba47b…
---
diff --git a/modules/sqlops/sql_api.c b/modules/sqlops/sql_api.c
index fe7acf5..744f730 100644
--- a/modules/sqlops/sql_api.c
+++ b/modules/sqlops/sql_api.c
@@ -261,7 +261,8 @@ int sql_do_query(sql_con_t *con, str *query, sql_result_t *res)
}
if(con->dbf.raw_query(con->dbh, query, &db_res)!=0)
{
- LM_ERR("cannot do the query\n");
+ LM_ERR("cannot do the query [%.*s]\n",
+ (query->len>32)?32:query->len, query->s);
return -1;
}