mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
device: pass original seq in async reply
When we get an async reply from the implementer, use the original seq from the caller in the reply. Fixes !287
This commit is contained in:
parent
5e51cbe48e
commit
5bdd65e066
2 changed files with 4 additions and 2 deletions
|
|
@ -532,7 +532,7 @@ static void node_event_info(void *object, const struct pw_node_info *info)
|
|||
|
||||
if (info->params[i].flags & SPA_PARAM_INFO_READ) {
|
||||
pw_log_debug(NAME" %p: node %d enum params %d", impl,
|
||||
node->obj.id, id);
|
||||
node->obj.id, id);
|
||||
pw_node_enum_params((struct pw_node*)node->obj.proxy,
|
||||
1, id, 0, UINT32_MAX, NULL);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ struct resource_data {
|
|||
|
||||
/* for async replies */
|
||||
int seq;
|
||||
int orig_seq;
|
||||
int end;
|
||||
struct result_device_params_data data;
|
||||
struct spa_hook listener;
|
||||
|
|
@ -299,7 +300,7 @@ static void result_device_params_async(void *data, int seq, int res, uint32_t ty
|
|||
if (seq == d->end)
|
||||
remove_busy_resource(d);
|
||||
if (seq == d->seq)
|
||||
result_device_params(&d->data, seq, res, type, result);
|
||||
result_device_params(&d->data, d->orig_seq, res, type, result);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -330,6 +331,7 @@ static int device_enum_params(void *object, int seq, uint32_t id, uint32_t start
|
|||
if (data->end == -1)
|
||||
spa_device_add_listener(device->device, &data->listener,
|
||||
&device_events, data);
|
||||
data->orig_seq = seq;
|
||||
data->seq = res;
|
||||
data->end = spa_device_sync(device->device, res);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue