Module: kamailio
Branch: master
Commit: b71ce6e5733ab08b84ff09481ada91e5fca43a33
URL:
https://github.com/kamailio/kamailio/commit/b71ce6e5733ab08b84ff09481ada91e…
Author: S-P Chan <shihping.chan(a)gmail.com>
Committer: S-P Chan <shihping.chan(a)gmail.com>
Date: 2024-01-31T16:47:09+08:00
db_unixodbc: use core/rthreads.h
---
Modified: src/modules/db_unixodbc/dbase.c
---
Diff:
https://github.com/kamailio/kamailio/commit/b71ce6e5733ab08b84ff09481ada91e…
Patch:
https://github.com/kamailio/kamailio/commit/b71ce6e5733ab08b84ff09481ada91e…
---
diff --git a/src/modules/db_unixodbc/dbase.c b/src/modules/db_unixodbc/dbase.c
index f3c01b81ee5..c4ba64b019c 100644
--- a/src/modules/db_unixodbc/dbase.c
+++ b/src/modules/db_unixodbc/dbase.c
@@ -22,10 +22,10 @@
*
*/
-#include <pthread.h>
#include "../../core/mem/mem.h"
#include "../../core/dprint.h"
#include "../../core/async_task.h"
+#include "../../core/rthreads.h"
#include "../../lib/srdb1/db_query.h"
#include "val.h"
#include "connection.h"
@@ -241,14 +241,7 @@ static db1_con_t *db_unixodbc_init0(const str *_url)
db1_con_t *db_unixodbc_init(const str *_url)
{
- pthread_t tid;
- db1_con_t *ret;
-
- pthread_create(
- &tid, NULL, (void *(*)(void *))db_unixodbc_init0, (void *)_url);
- pthread_join(tid, (void **)&ret);
-
- return ret;
+ return run_threadP((_thread_proto)&db_unixodbc_init0, (void *)_url);
}
/*