Module: kamailio
Branch: master
Commit: 51d9f92eca3ef1044052581c9438af6e643652a1
URL:
https://github.com/kamailio/kamailio/commit/51d9f92eca3ef1044052581c9438af6…
Author: S-P Chan <shihping.chan(a)gmail.com>
Committer: S-P Chan <shihping.chan(a)gmail.com>
Date: 2024-02-06T10:17:53+08:00
db_mysql: handle SSL and submit query
---
Modified: src/modules/db_mysql/km_dbase.c
---
Diff:
https://github.com/kamailio/kamailio/commit/51d9f92eca3ef1044052581c9438af6…
Patch:
https://github.com/kamailio/kamailio/commit/51d9f92eca3ef1044052581c9438af6…
---
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);
+}
/**
*
*/