Module: kamailio
Branch: master
Commit: 57d33a2d76219ae3d1eb503044dadaeddc7e06fd
URL:
https://github.com/kamailio/kamailio/commit/57d33a2d76219ae3d1eb503044dadae…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-09-17T12:55:10+02:00
lib/srdb1: db_use_table() more suggestive error messages
---
Modified: src/lib/srdb1/db.c
---
Diff:
https://github.com/kamailio/kamailio/commit/57d33a2d76219ae3d1eb503044dadae…
Patch:
https://github.com/kamailio/kamailio/commit/57d33a2d76219ae3d1eb503044dadae…
---
diff --git a/src/lib/srdb1/db.c b/src/lib/srdb1/db.c
index d33c9390c8..54b66d330b 100644
--- a/src/lib/srdb1/db.c
+++ b/src/lib/srdb1/db.c
@@ -477,8 +477,12 @@ int db_check_table_version(db_func_t* dbf, db1_con_t* dbh, const str*
table,
*/
int db_use_table(db1_con_t* _h, const str* _t)
{
- if (!_h || !_t || !_t->s) {
- LM_ERR("invalid parameter value\n");
+ if (!_h) {
+ LM_ERR("invalid connection parameter\n");
+ return -1;
+ }
+ if (!_t || !_t->s) {
+ LM_ERR("invalid table parameter value\n");
return -1;
}