Merge "OBEX: Set Min maxPacketLength negotiated in CONNECT Operation."

am: 3ac3170a4b

Change-Id: I477f407d94a43a14083fa68a7b271f5d4fe8445d
This commit is contained in:
Hemant Gupta
2017-02-16 13:10:19 +00:00
committed by android-build-merger

View File

@@ -658,6 +658,11 @@ public final class ServerSession extends ObexSession implements Runnable {
*/ */
byte[] sendData = new byte[totalLength]; byte[] sendData = new byte[totalLength];
int maxRxLength = ObexHelper.getMaxRxPacketSize(mTransport); int maxRxLength = ObexHelper.getMaxRxPacketSize(mTransport);
if (maxRxLength > mMaxPacketLength) {
if(V) Log.v(TAG,"Set maxRxLength to min of maxRxServrLen:" + maxRxLength +
" and MaxNegotiated from Client: " + mMaxPacketLength);
maxRxLength = mMaxPacketLength;
}
sendData[0] = (byte)code; sendData[0] = (byte)code;
sendData[1] = length[2]; sendData[1] = length[2];
sendData[2] = length[3]; sendData[2] = length[3];