[sr-dev] git:master:4137bebe: siptrace: check database table version only if db connector supports query
Daniel-Constantin Mierla
miconda at gmail.com
Thu Feb 21 16:05:00 CET 2019
Module: kamailio
Branch: master
Commit: 4137bebe3193075ab901f1cc9b2f23c34a9fb210
URL: https://github.com/kamailio/kamailio/commit/4137bebe3193075ab901f1cc9b2f23c34a9fb210
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-02-21T16:03:41+01:00
siptrace: check database table version only if db connector supports query
- reported by GH #1850
---
Modified: src/modules/siptrace/siptrace.c
---
Diff: https://github.com/kamailio/kamailio/commit/4137bebe3193075ab901f1cc9b2f23c34a9fb210.diff
Patch: https://github.com/kamailio/kamailio/commit/4137bebe3193075ab901f1cc9b2f23c34a9fb210.patch
---
diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c
index 05a6310f40..bc9c316ce3 100644
--- a/src/modules/siptrace/siptrace.c
+++ b/src/modules/siptrace/siptrace.c
@@ -423,13 +423,15 @@ static int child_init(int rank)
"configuration.\n");
return -1;
}
- if(db_check_table_version(
- &db_funcs, db_con, &siptrace_table, SIP_TRACE_TABLE_VERSION)
- < 0) {
- DB_TABLE_VERSION_ERROR(siptrace_table);
- db_funcs.close(db_con);
- db_con = 0;
- return -1;
+ if(DB_CAPABILITY(db_funcs, DB_CAP_QUERY)) {
+ if(db_check_table_version(
+ &db_funcs, db_con, &siptrace_table, SIP_TRACE_TABLE_VERSION)
+ < 0) {
+ DB_TABLE_VERSION_ERROR(siptrace_table);
+ db_funcs.close(db_con);
+ db_con = 0;
+ return -1;
+ }
}
}
More information about the sr-dev
mailing list