Mercurial > audlegacy-plugins
comparison src/bluetooth/bluetooth.c @ 2882:15754379dbd5
fixed the remove bonding bug and made it thread safe
author | Paula Stanciu <paula.stanciu@gmail.com> |
---|---|
date | Thu, 07 Aug 2008 20:00:52 +0300 |
parents | a9917a9cde99 |
children | 67d527114af5 |
comparison
equal
deleted
inserted
replaced
2881:66f53425a5dd | 2882:15754379dbd5 |
---|---|
87 } | 87 } |
88 | 88 |
89 void bt_about( void ) | 89 void bt_about( void ) |
90 { | 90 { |
91 printf("about call\n"); | 91 printf("about call\n"); |
92 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); | |
93 dbus_g_proxy_call(obj,"RemoveBonding",NULL,G_TYPE_STRING,((DeviceData*)(current_device->data))->address,G_TYPE_INVALID,G_TYPE_INVALID); | |
94 | |
92 } | 95 } |
93 | 96 |
94 void bt_cfg(void) | 97 void bt_cfg(void) |
95 { | 98 { |
96 printf("bt_cfg\n"); | 99 printf("bt_cfg\n"); |
125 //g_list_free(current_device); | 128 //g_list_free(current_device); |
126 } | 129 } |
127 static void remove_bonding() | 130 static void remove_bonding() |
128 { | 131 { |
129 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); | 132 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); |
130 dbus_g_proxy_call(obj,"RemoveBonding",NULL,G_TYPE_STRING,"00:0D:3C:B1:1C:7A",G_TYPE_INVALID,G_TYPE_INVALID); | 133 g_mutex_lock(bonded_dev_mutex); |
134 dbus_g_proxy_call(obj,"RemoveBonding",NULL,G_TYPE_STRING,bonded_dev,G_TYPE_INVALID,G_TYPE_INVALID); | |
135 g_mutex_unlock(bonded_dev_mutex); | |
131 | 136 |
132 } | 137 } |
133 void refresh_call(void) | 138 void refresh_call(void) |
134 { | 139 { |
135 printf("refresh function called\n"); | 140 printf("refresh function called\n"); |