protocol: improve old version check

Check if the pod size is > 4 because the unit test adds one fd
in the first message.
This commit is contained in:
Wim Taymans 2020-01-15 12:24:11 +01:00
parent 043e7f24fe
commit 1cedfade3a

View file

@ -313,7 +313,7 @@ static int prepare_packet(struct pw_protocol_native_connection *conn, struct buf
if (buf->first) { if (buf->first) {
buf->first = false; buf->first = false;
if (p[3] != 0) { if (p[3] >= 4) {
pw_log_warn("old version detected"); pw_log_warn("old version detected");
impl->version = 0; impl->version = 0;
impl->hdr_size = 8; impl->hdr_size = 8;