sap: retrigger bluetooth GetProperties call

When plugging a SAP capable modem, GetProperties need to be called again
to fetch the SAP Server devices from BlueZ.
This commit is contained in:
Gustavo F. Padovan 2011-09-27 18:04:15 -03:00 committed by Denis Kenzior
parent 9667db0b14
commit e73244a4a3
3 changed files with 9 additions and 0 deletions

View File

@ -900,6 +900,12 @@ static void bluetooth_unref(void)
g_hash_table_destroy(adapter_address_hash);
}
void bluetooth_get_properties()
{
g_hash_table_foreach(adapter_address_hash,
(GHFunc) get_adapter_properties, NULL);
}
int bluetooth_register_uuid(const char *uuid, struct bluetooth_profile *profile)
{
bluetooth_ref();

View File

@ -52,6 +52,7 @@ struct server;
typedef void (*ConnectFunc)(GIOChannel *io, GError *err, gpointer user_data);
void bluetooth_get_properties();
int bluetooth_register_uuid(const char *uuid,
struct bluetooth_profile *profile);
void bluetooth_unregister_uuid(const char *uuid);

View File

@ -66,6 +66,8 @@ int bluetooth_sap_client_register(struct bluetooth_sap_driver *sap,
sap_hw_modem = modem;
sap_hw_driver = sap;
bluetooth_get_properties();
return 0;
}