Module: kamailio Branch: 5.7 Commit: 103c62ba675f8d306e1c0fb60ddfd4c4bca1e931 URL: https://github.com/kamailio/kamailio/commit/103c62ba675f8d306e1c0fb60ddfd4c4...
Author: S-P Chan shihping.chan@gmail.com Committer: S-P Chan shihping.chan@gmail.com Date: 2024-02-06T13:13:59+08:00
db_mysql: handle SSL and submit query
(cherry-pick from 51d9f92eca3ef1044052581c9438af6e643652a1)
---
Modified: src/modules/db_mysql/km_dbase.c
---
Diff: https://github.com/kamailio/kamailio/commit/103c62ba675f8d306e1c0fb60ddfd4c4... Patch: https://github.com/kamailio/kamailio/commit/103c62ba675f8d306e1c0fb60ddfd4c4...
---
diff --git a/src/modules/db_mysql/km_dbase.c b/src/modules/db_mysql/km_dbase.c index 9cd238b78ab..e86e4a0391b 100644 --- a/src/modules/db_mysql/km_dbase.c +++ b/src/modules/db_mysql/km_dbase.c @@ -38,6 +38,8 @@ #include "../../core/mem/mem.h" #include "../../core/dprint.h" #include "../../core/async_task.h" + +#define KSR_RTHREAD_NEED_4PP #include "../../core/rthreads.h" #include "../../lib/srdb1/db_query.h" #include "../../lib/srdb1/db_ut.h" @@ -67,7 +69,7 @@ static char *mysql_sql_buf; * \param _s executed query * \return zero on success, negative value on failure */ -static int db_mysql_submit_query(const db1_con_t *_h, const str *_s) +static int db_mysql_submit_query_impl(const db1_con_t *_h, const str *_s) { time_t t; int i, code; @@ -128,6 +130,11 @@ static int db_mysql_submit_query(const db1_con_t *_h, const str *_s) }
+static int db_mysql_submit_query(const db1_con_t *_h, const str *_s) +{ + return run_thread4PP((_thread_proto4PP)db_mysql_submit_query_impl, + (void *)_h, (void *)_s); +} /** * */