summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-security.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2006-08-19 00:30:46 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2006-08-19 00:30:46 +0000
commit5c2f4ca97418ad12a764790a3b3d4023c987dd7f (patch)
treee198b85c1137c6f7e60a34b80a33bc1bd60c5a68 /hcid/dbus-security.c
parent37726232053804e18cb5c34e6dec42a8427240a2 (diff)
Cancel bonding if requestor exits
Diffstat (limited to 'hcid/dbus-security.c')
-rw-r--r--hcid/dbus-security.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/hcid/dbus-security.c b/hcid/dbus-security.c
index f7b409e6..c4ef5931 100644
--- a/hcid/dbus-security.c
+++ b/hcid/dbus-security.c
@@ -562,11 +562,8 @@ void cancel_passkey_agent_requests(struct slist *agents, const char *path, bdadd
{
struct slist *l, *next;
- if (!default_agent)
- return;
-
/* First check the default agent */
- for (l = default_agent->pending_requests; l != NULL; l = next) {
+ for (l = default_agent ? default_agent->pending_requests : NULL; l != NULL; l = next) {
struct pending_agent_request *req = l->data;
next = l->next;
if (!strcmp(path, req->path) && (!addr || !bacmp(addr, &req->bda))) {
@@ -588,5 +585,4 @@ void cancel_passkey_agent_requests(struct slist *agents, const char *path, bdadd
}
}
}
-
}