[sr-dev] git:5.4:4c234562: lib/srdb1: db_use_table() more suggestive error messages
Daniel-Constantin Mierla
miconda at gmail.com
Mon Oct 12 10:16:59 CEST 2020
Module: kamailio
Branch: 5.4
Commit: 4c234562bf0265f2a221231e7f3d72648166995f
URL: https://github.com/kamailio/kamailio/commit/4c234562bf0265f2a221231e7f3d72648166995f
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2020-10-12T10:07:47+02:00
lib/srdb1: db_use_table() more suggestive error messages
(cherry picked from commit 57d33a2d76219ae3d1eb503044dadaeddc7e06fd)
---
Modified: src/lib/srdb1/db.c
---
Diff: https://github.com/kamailio/kamailio/commit/4c234562bf0265f2a221231e7f3d72648166995f.diff
Patch: https://github.com/kamailio/kamailio/commit/4c234562bf0265f2a221231e7f3d72648166995f.patch
---
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;
}
More information about the sr-dev
mailing list