OBEX: Set Min maxPacketLength negotiated in CONNECT Operation.
Set OBEX Server maxRxLength to the minium value acceptable from
either server and client during CONNECT Operation.
Below basic and all PUT test cases fail without this fix, as the
maxPacketLength for later is less than maxRxLength of server.
TC_MSE_MMU_BV_03_I
TC_MSE_MMU_BV_02_I
Change-Id: Iaa4f92e3146dc13d647dca12c84eb43b91657efa
diff --git a/obex/javax/obex/ServerSession.java b/obex/javax/obex/ServerSession.java
index acee5dd..3831cf7 100644
--- a/obex/javax/obex/ServerSession.java
+++ b/obex/javax/obex/ServerSession.java
@@ -658,6 +658,11 @@
*/
byte[] sendData = new byte[totalLength];
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[1] = length[2];
sendData[2] = length[3];