mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-trx.git
synced 2025-10-23 08:22:00 +00:00
SocketsTest.testReaderIP(): Zero terminate received buffer
Change-Id: Icd144e672ab15cfb0955897dd6eb529c56908eba
This commit is contained in:
@@ -47,9 +47,10 @@ void *testReaderIP(void *param)
|
||||
readSocket->nonblocking();
|
||||
int rc = 0;
|
||||
while (rc<gNumToSend) {
|
||||
char buf[MAX_UDP_LENGTH] = { 0 };
|
||||
char buf[MAX_UDP_LENGTH+1] = { 0 };
|
||||
int count = readSocket->read(buf, MAX_UDP_LENGTH);
|
||||
if (count>0) {
|
||||
buf[count] = 0;
|
||||
CERR("read: " << buf);
|
||||
rc++;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user