summaryrefslogtreecommitdiffstats
path: root/plugins/sap.c
diff options
context:
space:
mode:
authorGustavo F. Padovan <gustavo@padovan.org>2011-09-27 18:04:20 -0300
committerDenis Kenzior <denkenz@gmail.com>2011-09-27 23:43:27 -0500
commit1f774bc1de184f4bcb525d4e5b260d4391bb4c4a (patch)
treed644b6670cef5d9af79fe5aa0e420f269f70a681 /plugins/sap.c
parente73244a4a3bd8f6fae1c9a1e82b99ae1d3da740b (diff)
downloadofono-1f774bc1de184f4bcb525d4e5b260d4391bb4c4a.tar.bz2
sap: fix sap modem remove
prefix NULL means that the modem needs to be removed
Diffstat (limited to 'plugins/sap.c')
-rw-r--r--plugins/sap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/sap.c b/plugins/sap.c
index b679ce5f..574031ab 100644
--- a/plugins/sap.c
+++ b/plugins/sap.c
@@ -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);