One RFsimulator end, close open connections

Use the correct function in order to close open RFsim connections,
instead of a simple close(). If this is not done correctly, it might
happen that the softmodem closes, but an L1 thread might still read
samples (bug in higher layers). Then, RFsim tries to read a socket
(because it has an open connection), but the actual connection had been
close()d. This commit fixes this behavior.
This commit is contained in:
Robert Schmidt
2024-03-19 15:26:49 +01:00
parent c16bde2928
commit 513f56e215
+1 -1
View File
@@ -1038,7 +1038,7 @@ static void rfsimulator_end(openair0_device *device) {
for (int i = 0; i < MAX_FD_RFSIMU; i++) {
buffer_t *b = &s->buf[i];
if (b->conn_sock >= 0 )
close(b->conn_sock);
removeCirBuf(s, b->conn_sock);
}
close(s->epollfd);
}