Commit graph

14 commits

Author SHA1 Message Date
Barnabás Pőcze
78aaa0a3dd pulse-server: client: move to cleanup list on detach
Move a client to the `impl->cleanup_clients` list right
after it has been removed its server's `clients` list.
2022-02-02 15:40:43 +00:00
Barnabás Pőcze
d2edb1ab16 pulse-server: client: do not leave dangling pointers behind 2022-02-02 15:40:43 +00:00
Wim Taymans
0904a35ba8 pulse-server: make separate index
Separate the id (the pipewire object id) from the index (what we send to
the client to identify the objects).
2022-01-17 12:01:13 +01:00
Barnabás Pőcze
3d081215f2 pulse-server: improve message queue pruning
Firstly, separate the message dropping logic into
its own `drop_from_out_queue()` function.

Secondly, do not check earlier messages if the NEW
event for a particular object has been reached while
processing a REMOVE event for that object.

Thirdly, if - while processing a REMOVE event -
the corresponding NEW event is found and dropped,
drop the REMOVE event as well.

See #1840
2022-01-13 18:14:42 +00:00
Barnabás Pőcze
043934655a pulse-server: client: add 'disconnect' event
Have the clients emit a 'disconnect' event when they are
being disconnected.
2021-12-26 19:37:41 +00:00
Barnabás Pőcze
2d4febaba1 pulse-server: client: do not drop partially sent messages
If the first message has already been partially sent, do not
drop it when looking for redundant messages.
2021-12-26 19:37:41 +00:00
Barnabás Pőcze
4678ea06a0 pulse-server: client: restructure message handling
Move all I/O event source modifications into client.c.
2021-12-26 19:37:41 +00:00
Barnabás Pőcze
5ef9deae83 pulse-server: client: do not queue messages after disconnect
Do not queue messages to be delivered to a client if
that client has already disconnected.
2021-12-26 19:37:41 +00:00
Barnabás Pőcze
6d2e6fde75 pulse-server: move parts of client creation
Move some portions of the client creation logic into client.c
so that it is easier to keep it in sync with `client_free()`, etc.
2021-12-26 19:37:41 +00:00
Barnabás Pőcze
9c218b2d08 pulse-server: remove unnecessary NULL checks
`free()` and `pw_properties_free()` already include a NULL
check before proceeding.
2021-12-26 19:37:41 +00:00
Wim Taymans
ac4ec20b01 pulse-server: free pending client message
If the client is destroyed before it could completely read the message,
free the pending message as well.

See #1840
2021-11-23 18:13:35 +01:00
Peter Hutterer
52a96bb602 modules: add log topics to module-protocol-pulse
This ends up using a nested namespace: mod.protocol-pulse for the module
itself, mod.protocol-pulse.foo for the various submodules and
extensions.
2021-09-28 09:35:39 +02:00
Barnabás Pőcze
d366487116 pulse-server: split out server creation and socket handling
Part of !776.
2021-06-25 03:23:32 +02:00
Barnabás Pőcze
49d31ea0af pulse-server: split out reply, operation, client, stream
Part of !776.
2021-06-25 03:23:27 +02:00