Module: kamailio
Branch: master
Commit: 941fbda5c66da6c8069b3bce3764249bbb58baaa
URL:
https://github.com/kamailio/kamailio/commit/941fbda5c66da6c8069b3bce3764249…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-03-10T14:38:38+01:00
sqlops: more verbose log message if execution of query fails
---
Modified: modules/sqlops/sql_api.c
---
Diff:
https://github.com/kamailio/kamailio/commit/941fbda5c66da6c8069b3bce3764249…
Patch:
https://github.com/kamailio/kamailio/commit/941fbda5c66da6c8069b3bce3764249…
---
diff --git a/modules/sqlops/sql_api.c b/modules/sqlops/sql_api.c
index 6ef90e2..4b19f33 100644
--- a/modules/sqlops/sql_api.c
+++ b/modules/sqlops/sql_api.c
@@ -259,7 +259,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;
}