From 66f5e125ef1e7085681e7385e731b10875926259 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sat, 4 Oct 2008 14:03:01 +0200 Subject: [PATCH] obexd: Use GW_OBEX_THREADS_ENABLED instead of G_THREADS_ENABLED --- obexd/gwobex/gw-obex.c | 6 +++--- obexd/gwobex/obex-priv.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/obexd/gwobex/gw-obex.c b/obexd/gwobex/gw-obex.c index 6549b0995..061e9e933 100644 --- a/obexd/gwobex/gw-obex.c +++ b/obexd/gwobex/gw-obex.c @@ -277,7 +277,7 @@ void gw_obex_close(GwObex *ctx) { ctx->gio_source = NULL; } GW_OBEX_UNLOCK(ctx); -#ifdef G_THREADS_ENABLED +#ifdef GW_OBEX_THREADS_ENABLED g_mutex_free(ctx->mutex); ctx->mutex = NULL; #endif @@ -300,7 +300,7 @@ GwObex *gw_obex_setup_fd(int fd, const gchar *uuid, gint uuid_len, ctx = make_context(handle); -#ifdef G_THREADS_ENABLED +#ifdef GW_OBEX_THREADS_ENABLED if (!g_thread_supported()) g_thread_init(NULL); ctx->mutex = g_mutex_new(); @@ -311,7 +311,7 @@ GwObex *gw_obex_setup_fd(int fd, const gchar *uuid, gint uuid_len, debug("Connecting to OBEX service\n"); if (!gw_obex_connect(ctx, uuid, uuid_len)) { debug("Unable to connect to OBEX service\n"); -#ifdef G_THREADS_ENABLED +#ifdef GW_OBEX_THREADS_ENABLED g_mutex_free(ctx->mutex); ctx->mutex = NULL; #endif diff --git a/obexd/gwobex/obex-priv.h b/obexd/gwobex/obex-priv.h index 051c67a6f..b6cbbf650 100644 --- a/obexd/gwobex/obex-priv.h +++ b/obexd/gwobex/obex-priv.h @@ -72,7 +72,7 @@ #define OBP_TYPE "x-obex/object-profile" #define LST_TYPE "x-obex/folder-listing" -#ifdef G_THREADS_ENABLED +#ifdef GW_OBEX_THREADS_ENABLED # ifdef DEBUG # define GW_OBEX_LOCK(ctx) do { \ debug("Attempting GW_OBEX_LOCK at %s:%d (%s)...", __FILE__, __LINE__, __PRETTY_FUNCTION__); \ @@ -105,7 +105,7 @@ typedef struct obex_connect_hdr { } __attribute__ ((packed)) obex_connect_hdr_t; struct gw_obex { -#ifdef G_THREADS_ENABLED +#ifdef GW_OBEX_THREADS_ENABLED /* To get rid of race conditions in multithreaded apps */ GMutex *mutex; #endif -- 2.47.3