(cherry picked from commit 57d33a2d76219ae3d1eb503044dadaeddc7e06fd)
... | ... |
@@ -468,8 +468,12 @@ int db_check_table_version(db_func_t* dbf, db1_con_t* dbh, const str* table, |
468 | 468 |
*/ |
469 | 469 |
int db_use_table(db1_con_t* _h, const str* _t) |
470 | 470 |
{ |
471 |
- if (!_h || !_t || !_t->s) { |
|
472 |
- LM_ERR("invalid parameter value\n"); |
|
471 |
+ if (!_h) { |
|
472 |
+ LM_ERR("invalid connection parameter\n"); |
|
473 |
+ return -1; |
|
474 |
+ } |
|
475 |
+ if (!_t || !_t->s) { |
|
476 |
+ LM_ERR("invalid table parameter value\n"); |
|
473 | 477 |
return -1; |
474 | 478 |
} |
475 | 479 |
|