mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -05:00
client-conf: Don't report failure from pa_client_conf_load()
pa_context already ignored the return value of pa_client_conf_load(), so the only places where the return value was not ignored were the D-Bus server lookup thing and pax11publish. I don't think those cases are negatively affected if they ignore errors in opening or parsing client.conf. pa_client_conf_env() never failed anyway, so returning int was obviously redundant.
This commit is contained in:
parent
d02511115c
commit
067e61cb66
4 changed files with 12 additions and 56 deletions
|
|
@ -115,7 +115,6 @@ finish:
|
|||
|
||||
enum get_address_result_t {
|
||||
SUCCESS,
|
||||
FAILED_TO_LOAD_CLIENT_CONF,
|
||||
SERVER_FROM_TYPE_FAILED
|
||||
};
|
||||
|
||||
|
|
@ -126,10 +125,7 @@ static enum get_address_result_t get_address(pa_server_type_t server_type, char
|
|||
|
||||
*address = NULL;
|
||||
|
||||
if (pa_client_conf_load(conf) < 0) {
|
||||
r = FAILED_TO_LOAD_CLIENT_CONF;
|
||||
goto finish;
|
||||
}
|
||||
pa_client_conf_load(conf);
|
||||
|
||||
if (conf->default_dbus_server)
|
||||
*address = pa_xstrdup(conf->default_dbus_server);
|
||||
|
|
@ -180,18 +176,6 @@ static DBusHandlerResult handle_get_address(DBusConnection *conn, DBusMessage *m
|
|||
r = DBUS_HANDLER_RESULT_HANDLED;
|
||||
goto finish;
|
||||
|
||||
case FAILED_TO_LOAD_CLIENT_CONF:
|
||||
if (!(reply = dbus_message_new_error(msg, "org.pulseaudio.ClientConfLoadError", "Failed to load client.conf."))) {
|
||||
r = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||
goto finish;
|
||||
}
|
||||
if (!dbus_connection_send(conn, reply, NULL)) {
|
||||
r = DBUS_HANDLER_RESULT_NEED_MEMORY;
|
||||
goto finish;
|
||||
}
|
||||
r = DBUS_HANDLER_RESULT_HANDLED;
|
||||
goto finish;
|
||||
|
||||
case SERVER_FROM_TYPE_FAILED:
|
||||
if (!(reply = dbus_message_new_error(msg, DBUS_ERROR_FAILED, "PulseAudio internal error: get_dbus_server_from_type() failed."))) {
|
||||
r = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||
|
|
@ -398,18 +382,6 @@ static DBusHandlerResult handle_get_all(DBusConnection *conn, DBusMessage *msg,
|
|||
r = DBUS_HANDLER_RESULT_HANDLED;
|
||||
goto finish;
|
||||
|
||||
case FAILED_TO_LOAD_CLIENT_CONF:
|
||||
if (!(reply = dbus_message_new_error(msg, "org.pulseaudio.ClientConfLoadError", "Failed to load client.conf."))) {
|
||||
r = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||
goto finish;
|
||||
}
|
||||
if (!dbus_connection_send(conn, reply, NULL)) {
|
||||
r = DBUS_HANDLER_RESULT_NEED_MEMORY;
|
||||
goto finish;
|
||||
}
|
||||
r = DBUS_HANDLER_RESULT_HANDLED;
|
||||
goto finish;
|
||||
|
||||
case SERVER_FROM_TYPE_FAILED:
|
||||
if (!(reply = dbus_message_new_error(msg, DBUS_ERROR_FAILED, "PulseAudio internal error: get_dbus_server_from_type() failed."))) {
|
||||
r = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue