connection: improve old version check

Check the type of the pod in the message instead. Old versions
should not have 0 there, new versions keep the number of file
descriptors, which should be 0 for the first message.
This commit is contained in:
Wim Taymans 2020-01-15 10:29:58 +01:00
parent a5b3538053
commit cf53ededd0

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[2] != 0) { if (p[3] != 0) {
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;