Module: kamailio Branch: master Commit: 4137bebe3193075ab901f1cc9b2f23c34a9fb210 URL: https://github.com/kamailio/kamailio/commit/4137bebe3193075ab901f1cc9b2f23c3...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@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/4137bebe3193075ab901f1cc9b2f23c3... Patch: https://github.com/kamailio/kamailio/commit/4137bebe3193075ab901f1cc9b2f23c3...
---
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; + } } }