[gnome-bluetooth] [PATCH 09/12] trivial: do not use deprecated g_thread_create
Ladislav Michl
ladis at linux-mips.org
Sun Jan 15 04:47:21 EST 2017
Signed-off-by: Ladislav Michl <ladis at linux-mips.org>
---
libgsm/phonemgr-listener.c | 3 +--
src/connection.c | 11 ++++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/libgsm/phonemgr-listener.c b/libgsm/phonemgr-listener.c
index 917ef34..b39bbb2 100644
--- a/libgsm/phonemgr-listener.c
+++ b/libgsm/phonemgr-listener.c
@@ -512,8 +512,7 @@ phonemgr_listener_connect (PhonemgrListener *l, const char *device, GError **err
phonemgr_listener_emit_status (l, PHONEMGR_LISTENER_CONNECTED);
phonemgr_listener_get_own_details (l);
- l->thread = g_thread_create ((GThreadFunc) phonemgr_listener_thread,
- l, TRUE, NULL);
+ l->thread = g_thread_new ("listener", (GThreadFunc) phonemgr_listener_thread, l);
return l->connected;
}
diff --git a/src/connection.c b/src/connection.c
index 90d3e4a..aac20ee 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -153,9 +153,9 @@ connect_phone (MyApp *app)
app->connecting = TRUE;
g_mutex_unlock (&app->connecting_mutex);
/* we're neither connected, nor connecting */
- app->connecting_thread = g_thread_create (connect_phone_thread,
- (gpointer) app,
- FALSE, NULL);
+ app->connecting_thread = g_thread_new ("connecting",
+ connect_phone_thread,
+ (gpointer) app);
} else {
g_message ("Can't connect twice");
g_mutex_unlock (&app->connecting_mutex);
@@ -254,8 +254,9 @@ reconnect_phone (MyApp *app)
g_message ("Disconnecting...");
app->reconnect = TRUE;
app->disconnecting_thread =
- g_thread_create ((GThreadFunc) phonemgr_listener_disconnect,
- (gpointer) app->listener, TRUE, NULL);
+ g_thread_new ("disconnecting",
+ (GThreadFunc) phonemgr_listener_disconnect,
+ (gpointer) app->listener);
} else {
connect_phone (app);
}
--
2.11.0
More information about the gnome-bluetooth
mailing list