struct player_callback *cb = mp->cb;
struct pending_req *p;
- if (cb == NULL || cb->cbs->set_setting == NULL)
- return g_dbus_pending_property_error(id,
+ if (cb == NULL || cb->cbs->set_setting == NULL) {
+ g_dbus_pending_property_error(id,
ERROR_INTERFACE ".NotSupported",
"Operation is not supported");
+ return;
+ }
p = find_pending(mp, key);
- if (p != NULL)
- return g_dbus_pending_property_error(id,
+ if (p != NULL) {
+ g_dbus_pending_property_error(id,
ERROR_INTERFACE ".InProgress",
"Operation already in progress");
+ return;
+ }
- if (!cb->cbs->set_setting(mp, key, value, cb->user_data))
- return g_dbus_pending_property_error(id,
+ if (!cb->cbs->set_setting(mp, key, value, cb->user_data)) {
+ g_dbus_pending_property_error(id,
ERROR_INTERFACE ".InvalidArguments",
"Invalid arguments in method call");
+ return;
+ }
p = pending_new(id, key, value);
struct media_player *mp = data;
const char *value;
- if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_STRING)
- return g_dbus_pending_property_error(id,
+ if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_STRING) {
+ g_dbus_pending_property_error(id,
ERROR_INTERFACE ".InvalidArguments",
"Invalid arguments in method call");
+ return;
+ }
dbus_message_iter_get_basic(iter, &value);
struct a2dp_transport *a2dp = transport->data;
uint16_t volume;
- if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_UINT16)
- return g_dbus_pending_property_error(id,
+ if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_UINT16) {
+ g_dbus_pending_property_error(id,
ERROR_INTERFACE ".InvalidArguments",
"Invalid arguments in method call");
+ return;
+ }
dbus_message_iter_get_basic(iter, &volume);
- if (volume > 127)
- return g_dbus_pending_property_error(id,
+ if (volume > 127) {
+ g_dbus_pending_property_error(id,
ERROR_INTERFACE ".InvalidArguments",
"Invalid arguments in method call");
+ return;
+ }
if (a2dp->volume != volume)
avrcp_set_volume(transport->device, volume);