gnss: block send_element if we have no agent

This commit is contained in:
Denis Kenzior 2011-03-25 14:48:44 -05:00
parent 206baad15b
commit 7358049a58
1 changed files with 3 additions and 0 deletions

View File

@ -230,6 +230,9 @@ static DBusMessage *gnss_send_element(DBusConnection *conn,
DBUS_TYPE_INVALID))
return __ofono_error_invalid_args(msg);
if (gnss->posr_agent == NULL)
return __ofono_error_not_available(msg);
if (!gnss_agent_sender_matches(gnss->posr_agent, caller))
return __ofono_error_access_denied(msg);