summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2017-11-29 20:03:12 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-11-29 20:03:12 +0000
commitedfb333a4d77df87d751b2c04770a4dca12892fa (patch)
tree0d9a420718822ae345cab5a7d064323e73122790
parent572f46a3ef0deccdd79ef083a7b2e338660be410 (diff)
parentb366d50971594562859d64c379ada79746fc06e7 (diff)
Merge "OBEX: Avoid pre-sending CONTINUE for SRM enabled case"
-rw-r--r--obex/javax/obex/ServerOperation.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/obex/javax/obex/ServerOperation.java b/obex/javax/obex/ServerOperation.java
index 56a675acf082..15ea36789e2c 100644
--- a/obex/javax/obex/ServerOperation.java
+++ b/obex/javax/obex/ServerOperation.java
@@ -195,7 +195,12 @@ public final class ServerOperation implements Operation, BaseStream {
if(!handleObexPacket(packet)) {
return;
}
- if (!mHasBody) {
+ /* Don't Pre-Send continue when Remote requested for SRM
+ * Let the Application confirm.
+ */
+ if (V) Log.v(TAG, "Get App confirmation if SRM ENABLED case: " + mSrmEnabled
+ + " not hasBody case: " + mHasBody);
+ if (!mHasBody && !mSrmEnabled) {
while ((!mGetOperation) && (!finalBitSet)) {
sendReply(ResponseCodes.OBEX_HTTP_CONTINUE);
if (mPrivateInput.available() > 0) {
@@ -204,8 +209,13 @@ public final class ServerOperation implements Operation, BaseStream {
}
}
}
-
- while ((!mGetOperation) && (!finalBitSet) && (mPrivateInput.available() == 0)) {
+ /* Don't Pre-Send continue when Remote requested for SRM
+ * Let the Application confirm.
+ */
+ if (V) Log.v(TAG, "Get App confirmation if SRM ENABLED case: " + mSrmEnabled
+ + " not finalPacket: " + finalBitSet + " not GETOp Case: " + mGetOperation);
+ while ((!mSrmEnabled) && (!mGetOperation) && (!finalBitSet)
+ && (mPrivateInput.available() == 0)) {
sendReply(ResponseCodes.OBEX_HTTP_CONTINUE);
if (mPrivateInput.available() > 0) {
break;