Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix incorrect buffer management in send and rcv buffering.

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@7258 19bc5d8c-e614-43d4-8b26-e1612bc8e597
  • Loading branch information...
commit 4619debc0d18bbc976c39fe88dee192633e8fb53 1 parent a49448f
hsamra authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 TransceiverRAD1/radioInterface.cpp
View
4 TransceiverRAD1/radioInterface.cpp
@@ -170,7 +170,7 @@ void RadioInterface::pushBuffer(void) {
writeTimestamp += (TIMESTAMP) samplesWritten;
if (sendCursor > 2*samplesWritten)
- memcpy(sendBuffer,sendBuffer+samplesWritten*2,sizeof(short)*2*(sendCursor-2*samplesWritten));
+ memcpy(sendBuffer,sendBuffer+samplesWritten*2,sizeof(short)*(sendCursor-2*samplesWritten));
sendCursor = sendCursor - 2*samplesWritten;
}
@@ -338,7 +338,7 @@ void RadioInterface::driveReceiveRadio() {
}
if (readSz > 0) {
- memcpy(rcvBuffer,rcvBuffer+2*readSz,sizeof(short)*2*(rcvCursor-readSz));
+ memcpy(rcvBuffer,rcvBuffer+2*readSz,sizeof(short)*(rcvCursor-2*readSz));
rcvCursor = rcvCursor-2*readSz;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.