sap: fix sap modem remove

prefix NULL means that the modem needs to be removed
This commit is contained in:
Gustavo F. Padovan 2011-09-27 18:04:20 -03:00 committed by Denis Kenzior
parent e73244a4a3
commit 1f774bc1de
1 changed files with 2 additions and 2 deletions

View File

@ -234,13 +234,13 @@ static void bluetooth_sap_remove(const char *prefix)
DBG("%s", prefix);
if (modem_hash == NULL || prefix == NULL)
if (modem_hash == NULL)
return;
g_hash_table_iter_init(&iter, modem_hash);
while (g_hash_table_iter_next(&iter, &key, &value)) {
if (g_str_has_prefix((char *)key, prefix) == FALSE)
if (prefix && g_str_has_prefix((char *)key, prefix) == FALSE)
continue;
g_hash_table_iter_remove(&iter);