Browse code

lib/srdb1: db_use_table() more suggestive error messages

Daniel-Constantin Mierla authored on 17/09/2020 10:55:10
Showing 1 changed files
... ...
@@ -477,8 +477,12 @@ int db_check_table_version(db_func_t* dbf, db1_con_t* dbh, const str* table,
477 477
  */
478 478
 int db_use_table(db1_con_t* _h, const str* _t)
479 479
 {
480
-	if (!_h || !_t || !_t->s) {
481
-		LM_ERR("invalid parameter value\n");
480
+	if (!_h) {
481
+		LM_ERR("invalid connection parameter\n");
482
+		return -1;
483
+	}
484
+	if (!_t || !_t->s) {
485
+		LM_ERR("invalid table parameter value\n");
482 486
 		return -1;
483 487
 	}
484 488