mirror of https://github.com/sipwise/kamailio.git
44 lines
1.3 KiB
44 lines
1.3 KiB
From: S-P Chan <shihping.chan@gmail.com>
|
|
Date: Tue, 6 Feb 2024 00:29:41 +0800
|
|
Subject: db_mysql: handle SSL and submit query
|
|
|
|
(cherry-pick from 51d9f92eca3ef1044052581c9438af6e643652a1)
|
|
---
|
|
src/modules/db_mysql/km_dbase.c | 9 ++++++++-
|
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/modules/db_mysql/km_dbase.c b/src/modules/db_mysql/km_dbase.c
|
|
index 9cd238b..e86e4a0 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);
|
|
+}
|
|
/**
|
|
*
|
|
*/
|