From 842eb643eb5bd9c41cf6834466ab60cfec4803f2 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Fri, 20 Mar 2015 15:42:50 -0500 Subject: [PATCH] wiphy: Return an error if agent request fails If there is no agent registered, then the caller should not be hanging without a response forever. --- src/wiphy.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wiphy.c b/src/wiphy.c index 0dbc0d3f..e21128a1 100644 --- a/src/wiphy.c +++ b/src/wiphy.c @@ -338,6 +338,10 @@ static struct l_dbus_message *network_connect(struct l_dbus *dbus, network->object_path, passphrase_callback, network); + + if (!network->agent_request) + return dbus_error_no_agent(message); + break; }