From 74e5f9fbcf3c69c61ba1669f00de1c0a86090b80 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 7 Jan 2019 15:48:06 +0100 Subject: [PATCH] fix function types --- src/pipewire/link.c | 17 ++++++++--------- src/pipewire/node.c | 5 +++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/pipewire/link.c b/src/pipewire/link.c index 4bd93d2c6..20d3328f6 100644 --- a/src/pipewire/link.c +++ b/src/pipewire/link.c @@ -906,26 +906,26 @@ int pw_link_activate(struct pw_link *this) } return 0; } - -static int check_states(struct pw_link *this, void *user_data, int res) +static void check_states(void *obj, void *user_data, int res, uint32_t id) { + struct pw_link *this = obj; struct impl *impl = SPA_CONTAINER_OF(this, struct impl, this); int in_state, out_state; struct pw_port *input, *output; int in_mix_state, out_mix_state; if (this->info.state == PW_LINK_STATE_ERROR) - return -EIO; + return; input = this->input; output = this->output; if (input == NULL || output == NULL) - return -EIO; + return; if (input->node->info.state == PW_NODE_STATE_ERROR || output->node->info.state == PW_NODE_STATE_ERROR) - return -EIO; + return; in_state = input->state; out_state = output->state; @@ -934,7 +934,7 @@ static int check_states(struct pw_link *this, void *user_data, int res) if (in_state == PW_PORT_STATE_ERROR || out_state == PW_PORT_STATE_ERROR) { pw_link_update_state(this, PW_LINK_STATE_ERROR, NULL); - return -EIO; + return; } if (PW_PORT_IS_CONTROL(output) && PW_PORT_IS_CONTROL(input)) { @@ -947,7 +947,7 @@ static int check_states(struct pw_link *this, void *user_data, int res) if (in_mix_state == PW_PORT_STATE_PAUSED && out_mix_state == PW_PORT_STATE_PAUSED) { pw_link_update_state(this, PW_LINK_STATE_PAUSED, NULL); - return 0; + return; } if ((res = do_negotiate(this, in_state, out_state)) != 0) @@ -959,12 +959,11 @@ static int check_states(struct pw_link *this, void *user_data, int res) exit: if (SPA_RESULT_IS_ERROR(res)) { pw_log_debug("link %p: got error result %d", this, res); - return res; + return; } pw_work_queue_add(impl->work, this, -EBUSY, (pw_work_func_t) check_states, this); - return res; } static void diff --git a/src/pipewire/node.c b/src/pipewire/node.c index 7a039e90d..06a691a1b 100644 --- a/src/pipewire/node.c +++ b/src/pipewire/node.c @@ -1110,8 +1110,9 @@ uint32_t pw_node_get_free_port_id(struct pw_node *node, enum pw_direction direct return SPA_ID_INVALID; } -static void on_state_complete(struct pw_node *node, void *data, int res) +static void on_state_complete(void *obj, void *data, int res, uint32_t seq) { + struct pw_node *node = obj; enum pw_node_state state = SPA_PTR_TO_INT(data); char *error = NULL; @@ -1192,7 +1193,7 @@ int pw_node_set_state(struct pw_node *node, enum pw_node_state state) return res; pw_work_queue_add(impl->work, - node, res, (pw_work_func_t) on_state_complete, SPA_INT_TO_PTR(state)); + node, res, on_state_complete, SPA_INT_TO_PTR(state)); return res; }