Module: kamailio Branch: master Commit: 042971bcb6bb47ced735f5405fa5534f94d81dce URL: https://github.com/kamailio/kamailio/commit/042971bcb6bb47ced735f5405fa5534f94d81dce
Author: Federico Cabiddu <federico.cabi...@gmail.com> Committer: GitHub <nore...@github.com> Date: 2019-08-27T09:26:48+02:00 Merge pull request #2047 from kamailio/grumvalski/siptrace_fix siptrace: check if trace_to_database is set before checking the db co⦠--- Modified: src/modules/siptrace/siptrace.c --- Diff: https://github.com/kamailio/kamailio/commit/042971bcb6bb47ced735f5405fa5534f94d81dce.diff Patch: https://github.com/kamailio/kamailio/commit/042971bcb6bb47ced735f5405fa5534f94d81dce.patch --- diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c index 8fa832a043..211ddac363 100644 --- a/src/modules/siptrace/siptrace.c +++ b/src/modules/siptrace/siptrace.c @@ -542,14 +542,14 @@ static int sip_trace_store(siptrace_data_t *sto, dest_info_t *dst, static int sip_trace_store_db(siptrace_data_t *sto) { + if(trace_to_database_flag == NULL || *trace_to_database_flag == 0) + goto done; + if(db_con == NULL) { LM_DBG("database connection not initialized\n"); return -1; } - if(trace_to_database_flag == NULL || *trace_to_database_flag == 0) - goto done; - db_key_t db_keys[NR_KEYS]; db_val_t db_vals[NR_KEYS];
_______________________________________________ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev