pulse-server: send STREAM_MOVED messages

Keep track of the last known peer of a stream and send a moved message
when it changes.

Fixes #2407
This commit is contained in:
Wim Taymans 2022-06-03 16:59:08 +02:00
parent be9c738661
commit efe30d5075
3 changed files with 75 additions and 0 deletions

View file

@ -60,6 +60,8 @@ struct stream {
uint32_t id; /* id of global */
uint32_t index; /* index */
uint32_t peer_index;
struct impl *impl;
struct client *client;
enum stream_type type;
@ -128,5 +130,6 @@ int stream_send_killed(struct stream *stream);
int stream_send_started(struct stream *stream);
int stream_send_request(struct stream *stream);
int stream_update_minreq(struct stream *stream, uint32_t minreq);
int stream_send_moved(struct stream *stream, uint32_t peer_index, const char *peer_name);
#endif /* PULSER_SERVER_STREAM_H */