diff options
author | Tanu Kaskinen <ext-tanu.kaskinen@nokia.com> | 2010-03-29 08:25:42 +0300 |
---|---|---|
committer | Tanu Kaskinen <ext-tanu.kaskinen@nokia.com> | 2010-05-10 14:10:09 +0300 |
commit | acaeb71cf876e9c6a68c9828cea8c7d69ccc8cf8 (patch) | |
tree | b69d7ea00e4f1664adf68b6323eb61511dabfdf4 | |
parent | ad7c8ebff5ec1dcbbaa0ae68b87f98c719ffcba1 (diff) |
dbus: Fix segfault when receiving a property access call that isn't permitted.
-rw-r--r-- | src/pulsecore/protocol-dbus.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pulsecore/protocol-dbus.c b/src/pulsecore/protocol-dbus.c index 582bc658..a8a9d603 100644 --- a/src/pulsecore/protocol-dbus.c +++ b/src/pulsecore/protocol-dbus.c @@ -406,7 +406,7 @@ static enum find_result_t find_handler_from_properties_call(struct call_info *ca return NO_SUCH_PROPERTY_INTERFACE; else if ((call_info->property_handler = pa_hashmap_get(call_info->iface_entry->property_handlers, call_info->property))) - return FOUND_GET_PROPERTY; + return call_info->property_handler->get_cb ? FOUND_GET_PROPERTY : PROPERTY_ACCESS_DENIED; else return NO_SUCH_PROPERTY; @@ -440,7 +440,7 @@ static enum find_result_t find_handler_from_properties_call(struct call_info *ca call_info->expected_property_sig = call_info->property_handler->type; if (pa_streq(call_info->property_sig, call_info->expected_property_sig)) - return FOUND_SET_PROPERTY; + return call_info->property_handler->set_cb ? FOUND_SET_PROPERTY : PROPERTY_ACCESS_DENIED; else return INVALID_PROPERTY_SIG; |