card: do not quit on error sending message to object

Server API versions < 35 do not support PA_COMMAND_SEND_OBJECT_MESSAGE
one of these is current Pipewire pulseaudio server.

Do not quit on error sending message to object, this is already handled as if
send message API is not available.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pavucontrol/-/merge_requests/57>
This commit is contained in:
Igor V. Kovalenko 2021-02-27 15:12:46 +03:00
parent d66137f9a8
commit 1515492168
2 changed files with 2 additions and 2 deletions

View File

@ -141,7 +141,7 @@ void CardWidget::onCodecChange() {
if (!(o = pa_context_send_message_to_object(get_context(), card_bluez_message_handler_path(pulse_card_name).c_str(),
"switch-codec", codec_message.c_str(), NULL, NULL))) {
show_error(_("pa_context_set_card_profile_by_index() failed"));
g_debug(_("pa_context_send_message_to_object() failed: %s"), pa_strerror(pa_context_errno(get_context())));
return;
}

View File

@ -155,7 +155,7 @@ template<typename U> void send_message(pa_context *c, const char *target, const
if (!o) {
delete send_message_userdata;
show_error(_("pa_context_send_message_to_object() failed"));
g_debug(_("pa_context_send_message_to_object() failed: %s"), pa_strerror(pa_context_errno(context)));
return;
}
pa_operation_unref(o);