OBEX: Handling GET operation properly
This change handles GET operation properly whenever
Input stream is getting aborted in between.
CRs-fixed: 668890
Change-Id: Idcb4ea04abb57353af5ab1fef050b3a36579892e
diff --git a/obex/javax/obex/ClientOperation.java b/obex/javax/obex/ClientOperation.java
index 75278b5..26c91c3 100644
--- a/obex/javax/obex/ClientOperation.java
+++ b/obex/javax/obex/ClientOperation.java
@@ -723,12 +723,14 @@
mReplyHeader.responseCode = ResponseCodes.OBEX_HTTP_CONTINUE;
}
- while (mReplyHeader.responseCode == ResponseCodes.OBEX_HTTP_CONTINUE) {
+ while ((mReplyHeader.responseCode == ResponseCodes.OBEX_HTTP_CONTINUE)
+ && !mOperationDone) {
if (!sendRequest(0x83)) {
break;
}
}
- while (mReplyHeader.responseCode == ResponseCodes.OBEX_HTTP_CONTINUE) {
+ while ((mReplyHeader.responseCode == ResponseCodes.OBEX_HTTP_CONTINUE) &&
+ !mOperationDone) {
mParent.sendRequest(0x83, null, mReplyHeader, mPrivateInput);
}
mOperationDone = true;