[PATCH v2 8/8] agent: Make sure we got an agent before asking user

Jukka Rissanen jukka.rissanen at linux.intel.com
Fri Sep 6 04:12:19 PDT 2013


---
 src/agent-connman.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/agent-connman.c b/src/agent-connman.c
index 8efedc8..7f63a3b 100644
--- a/src/agent-connman.c
+++ b/src/agent-connman.c
@@ -419,7 +419,7 @@ int __connman_agent_request_passphrase_input(struct connman_service *service,
 
 	DBG("agent %p service %p path %s", agent, service, agent_path);
 
-	if (!service || !agent_path || !callback)
+	if (!service || !agent || !agent_path || !callback)
 		return -ESRCH;
 
 	message = dbus_message_new_method_call(agent_sender, agent_path,
@@ -503,7 +503,7 @@ int __connman_agent_request_login_input(struct connman_service *service,
 
 	agent = connman_agent_get_info(NULL, &agent_sender, &agent_path);
 
-	if (!service || !agent_path || !callback)
+	if (!service || !agent || !agent_path || !callback)
 		return -ESRCH;
 
 	message = dbus_message_new_method_call(agent_sender, agent_path,
@@ -592,7 +592,7 @@ int __connman_agent_request_browser(struct connman_service *service,
 
 	agent = connman_agent_get_info(NULL, &agent_sender, &agent_path);
 
-	if (!service || !agent_path || !callback)
+	if (!service || !agent || !agent_path || !callback)
 		return -ESRCH;
 
 	if (!url)
-- 
1.7.11.7




More information about the connman mailing list