From c2da8380e9fa83029975b14b7d3075d9268883b0 Mon Sep 17 00:00:00 2001 From: c vw Date: Mon, 22 Nov 2021 17:19:43 +0100 Subject: [PATCH] Removes SO_PRIORITY settings since this (experimentally) leads to more RX sequence errors --- new_protocol.c | 7 +------ old_protocol.c | 14 ++------------ 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/new_protocol.c b/new_protocol.c index ef29042..0341cca 100644 --- a/new_protocol.c +++ b/new_protocol.c @@ -598,12 +598,7 @@ void new_protocol_init(int pixels) { //optval = 0x10; // IPTOS_LOWDELAY optval = 0xb8; // DSCP EF if(setsockopt(data_socket, IPPROTO_IP, IP_TOS, &optval, sizeof(optval))<0) { - perror("data_socket: SO_PRIORITY"); - } -#else - optval = 6; - if(setsockopt(data_socket, SOL_SOCKET, SO_PRIORITY, &optval, sizeof(optval))<0) { - perror("data_socket: SO_PRIORITY"); + perror("data_socket: IP_TOS"); } #endif diff --git a/old_protocol.c b/old_protocol.c index 3ece712..1c80355 100644 --- a/old_protocol.c +++ b/old_protocol.c @@ -409,12 +409,7 @@ static void open_udp_socket() { //optval = 0x10; // IPTOS_LOWDELAY optval = 0xb8; // DSCP EF if(setsockopt(tmp, IPPROTO_IP, IP_TOS, &optval, sizeof(optval))<0) { - perror("data_socket: SO_PRIORITY"); - } -#else - optval = 6; - if(setsockopt(tmp, SOL_SOCKET, SO_PRIORITY, &optval, sizeof(optval))<0) { - perror("data_socket: SO_PRIORITY"); + perror("data_socket: IP_TOS"); } #endif @@ -484,12 +479,7 @@ static void open_tcp_socket() { //optval = 0x10; // IPTOS_LOWDELAY optval = 0xb8; // DSCP EF if(setsockopt(tmp, IPPROTO_IP, IP_TOS, &optval, sizeof(optval))<0) { - perror("data_socket: SO_PRIORITY"); - } -#else - optval = 6; - if(setsockopt(tmp, SOL_SOCKET, SO_PRIORITY, &optval, sizeof(optval))<0) { - perror("data_socket: SO_PRIORITY"); + perror("data_socket: IP_TOS"); } #endif tcp_socket=tmp; -- 2.45.2