Mercurial > audlegacy-plugins
diff src/bluetooth/bluetooth.c @ 2756:d3d71539d675
rescan functionality
| author | Paula Stanciu <paula.stanciu@gmail.com> |
|---|---|
| date | Tue, 01 Jul 2008 19:35:16 +0300 |
| parents | 8a102490a8c0 |
| children | 22a2ffe86750 |
line wrap: on
line diff
--- a/src/bluetooth/bluetooth.c Tue Jul 01 00:51:38 2008 -0500 +++ b/src/bluetooth/bluetooth.c Tue Jul 01 19:35:16 2008 +0300 @@ -49,7 +49,7 @@ { printf("bluetooth: exit\n"); if (config ==1 ){ - destroy_scan_window(); + close_window(); config =0; } if(discover_finish == 2) { @@ -91,14 +91,25 @@ } +void clean_devices_list(){ + g_list_free(audio_devices); + dbus_g_connection_flush (bus); + dbus_g_connection_unref(bus); + audio_devices = NULL; + //g_list_free(current_device); +} void refresh_call(void) { printf("refresh function called\n"); disconnect_dbus_signals(); + clean_devices_list(); if(discover_finish == 0 ||discover_finish== 2){ discover_finish = 0; + discover_devices(); + close_window(); + show_scan(); } else printf("Scanning please wait!\n");
