diff options
author | Ashwini Munigala <AshwiniM@codeaurora.org> | 2015-07-24 18:08:25 +0530 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:26:54 -0600 |
commit | deec005b23b3524bba7f12e8896e167058a67ca8 (patch) | |
tree | 2c41a273ecb82322a455f318a3d8ca5c9ea68b21 | |
parent | 9fc5f0faf68ba76471c80cc1aea8956ce7ae005b (diff) | |
download | frameworks_base-deec005b23b3524bba7f12e8896e167058a67ca8.zip frameworks_base-deec005b23b3524bba7f12e8896e167058a67ca8.tar.gz frameworks_base-deec005b23b3524bba7f12e8896e167058a67ca8.tar.bz2 |
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
-rw-r--r-- | obex/javax/obex/ServerSession.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/obex/javax/obex/ServerSession.java b/obex/javax/obex/ServerSession.java index acee5dd..dcd0ce8 100644 --- a/obex/javax/obex/ServerSession.java +++ b/obex/javax/obex/ServerSession.java @@ -658,6 +658,12 @@ public final class ServerSession extends ObexSession implements Runnable { */ byte[] sendData = new byte[totalLength]; int maxRxLength = ObexHelper.getMaxRxPacketSize(mTransport); + //PTS expects least of maxPacketLen + 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]; |