changeset 2845:d0cbf303869b

removed interface freeze while pairing
author Paula Stanciu <paula.stanciu@gmail.com>
date Fri, 25 Jul 2008 12:03:16 +0300
parents d75f0db10f53
children 3d7f01edb388 fbb32674bfd2
files src/bluetooth/agent.c src/bluetooth/bluetooth.c
diffstat 2 files changed, 13 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/bluetooth/agent.c	Wed Jul 23 14:29:25 2008 +0200
+++ b/src/bluetooth/agent.c	Fri Jul 25 12:03:16 2008 +0300
@@ -764,6 +764,5 @@
 
     register_agents();
 
-
 }
 
--- a/src/bluetooth/bluetooth.c	Wed Jul 23 14:29:25 2008 +0200
+++ b/src/bluetooth/bluetooth.c	Fri Jul 25 12:03:16 2008 +0300
@@ -27,7 +27,7 @@
 gint config = 0;
 gint devices_no = 0;
 GStaticMutex mutex = G_STATIC_MUTEX_INIT;
-
+static GThread *connect_th;
 void bluetooth_init ( void );
 void bluetooth_cleanup ( void );
 void bt_cfg(void);
@@ -142,22 +142,24 @@
 }
 
 
-void connect_call(void)
+gpointer connect_call_th(void)
 {
 
     //I will have to enable the audio service if necessary 
 
-    /* dbus_g_object_register_marshaller(marshal_VOID__STRING_UINT_INT, G_TYPE_NONE, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_INT, G_TYPE_INVALID);
-       dbus_g_proxy_add_signal(obj, "BondingCreated", G_TYPE_STRING, G_TYPE_UINT, G_TYPE_INT, G_TYPE_INVALID);
-       dbus_g_proxy_connect_signal(obj, "BondingCreated", G_CALLBACK(bounding_created), bus, NULL);
+    dbus_g_object_register_marshaller(marshal_VOID__STRING_UINT_INT, G_TYPE_NONE, G_TYPE_STRING, G_TYPE_UINT, G_TYPE_INT, G_TYPE_INVALID);
+    dbus_g_proxy_add_signal(obj, "BondingCreated", G_TYPE_STRING, G_TYPE_UINT, G_TYPE_INT, G_TYPE_INVALID);
+    dbus_g_proxy_connect_signal(obj, "BondingCreated", G_CALLBACK(bounding_created), bus, NULL);
 
-       dbus_g_proxy_add_signal(obj, "BondingRemoved", G_TYPE_STRING, G_TYPE_UINT, G_TYPE_INT, G_TYPE_INVALID);
-       dbus_g_proxy_connect_signal(obj, "BondingRemoved", G_CALLBACK(bounding_removed), bus, NULL);
-       */ 
+    dbus_g_proxy_add_signal(obj, "BondingRemoved", G_TYPE_STRING, G_TYPE_UINT, G_TYPE_INT, G_TYPE_INVALID);
+    dbus_g_proxy_connect_signal(obj, "BondingRemoved", G_CALLBACK(bounding_removed), bus, NULL);
     run_agents();
-    dbus_g_proxy_call(obj,"CreateBonding",NULL,G_TYPE_STRING,((DeviceData*)(selected_dev->data))->address,G_TYPE_INVALID,G_TYPE_INVALID);  
-
-
+    dbus_g_proxy_call(obj,"CreateBonding",NULL,G_TYPE_STRING,((DeviceData*)(selected_dev->data))->address,G_TYPE_INVALID,G_TYPE_INVALID); 
+     
+}
+void connect_call(void)
+{
+ connect_th = g_thread_create((GThreadFunc)connect_call_th,NULL,TRUE,NULL) ;  
 }