From: c vw Date: Thu, 15 Nov 2018 11:01:37 +0000 (+0100) Subject: Send seq num only for non-suppressed packets. X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/status?a=commitdiff_plain;h=003ba09353d74de64f62a593ba27208686fa9b44;p=pihpsdr.git Send seq num only for non-suppressed packets. --- diff --git a/old_protocol.c b/old_protocol.c index ea11203..0ac2e79 100644 --- a/old_protocol.c +++ b/old_protocol.c @@ -1380,17 +1380,18 @@ static int metis_write(unsigned char ep,unsigned char* buffer,int length) { metis_buffer[5]=(send_sequence>>16)&0xFF; metis_buffer[6]=(send_sequence>>8)&0xFF; metis_buffer[7]=(send_sequence)&0xFF; - send_sequence++; - // // When using UDP, the buffer will ALWAYS be sent. However, when using TCP, // we must be able to suppress sending buffers HERE asynchronously // when we want to sent a METIS start or stop packet. This is so because TCP // is a byte stream, and data from two sources might end up interleaved + // In order not to confuse the SDR, we increase the sequence number only + // for packets actually sent. // if (!suppress_ozy_packet) { // send the buffer + send_sequence++; metis_send_buffer(&metis_buffer[0],1032); } metis_offset=8;