From e2c4033b577c1848a22d8f4ddee91ad64e18ca3a Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Thu, 7 Aug 2025 12:16:11 +0200 Subject: [PATCH] When a client connects, we need to start the send/receive loop but the first reception is void data --- radio/rfsimulator/simulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radio/rfsimulator/simulator.c b/radio/rfsimulator/simulator.c index f7e035d375..1a5c94f698 100644 --- a/radio/rfsimulator/simulator.c +++ b/radio/rfsimulator/simulator.c @@ -181,7 +181,7 @@ static buffer_t *allocCirBuf(rfsimulator_state_t *bridge, int sock) ptr->conn_sock = sock; ptr->lastReceivedTS = 0; ptr->headerMode = true; - ptr->trashingPacket = false; + ptr->trashingPacket = true; ptr->transferPtr = (char *)&ptr->th; ptr->remainToTransfer = sizeof(samplesBlockHeader_t); int sendbuff = SEND_BUFF_SIZE; @@ -980,7 +980,7 @@ static int rfsimulator_read(openair0_device *device, openair0_timestamp *ptimest for (int sock = 0; sock < MAX_FD_RFSIMU; sock++) { buffer_t *ptr = &t->buf[sock]; - if (ptr->circularBuf) { + if (ptr->circularBuf && !ptr->trashingPacket) { bool reGenerateChannel = false; // fixme: when do we regenerate