diff options
author | Hemant Gupta <hemantg@codeaurora.org> | 2014-05-30 22:25:20 +0530 |
---|---|---|
committer | Andre Eisenbach <eisenbach@google.com> | 2015-05-16 01:19:19 +0000 |
commit | 50ba032f4a81155c5f10561d39a4f258a0e4f244 (patch) | |
tree | 5e3c794e9a6c17d9d32512c88b8f9344969d3b20 /obex/javax | |
parent | 89942588b7b89bd83c39e91236cafcc5f6775b5f (diff) | |
download | frameworks_base-50ba032f4a81155c5f10561d39a4f258a0e4f244.zip frameworks_base-50ba032f4a81155c5f10561d39a4f258a0e4f244.tar.gz frameworks_base-50ba032f4a81155c5f10561d39a4f258a0e4f244.tar.bz2 |
OBEX: Handle GET operation properly
This change handles GET operation properly whenever the
Input stream is getting aborted in between. Without this
patch it was observed that GET request was being sent by
DUT even when abort has been sent/received resulting
in IOT issues with some remote devices including PTS.
Change-Id: Idcb4ea04abb57353af5ab1fef050b3a36579892e
Diffstat (limited to 'obex/javax')
-rw-r--r-- | obex/javax/obex/ClientOperation.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/obex/javax/obex/ClientOperation.java b/obex/javax/obex/ClientOperation.java index cc20d39..883c8c6 100644 --- a/obex/javax/obex/ClientOperation.java +++ b/obex/javax/obex/ClientOperation.java @@ -784,12 +784,12 @@ public final class ClientOperation implements Operation, BaseStream { mReplyHeader.responseCode = ResponseCodes.OBEX_HTTP_CONTINUE; } - while (mReplyHeader.responseCode == ResponseCodes.OBEX_HTTP_CONTINUE) { + while (mReplyHeader.responseCode == ResponseCodes.OBEX_HTTP_CONTINUE && !mOperationDone) { if (!sendRequest(ObexHelper.OBEX_OPCODE_GET_FINAL)) { break; } } - while (mReplyHeader.responseCode == ResponseCodes.OBEX_HTTP_CONTINUE) { + while (mReplyHeader.responseCode == ResponseCodes.OBEX_HTTP_CONTINUE && !mOperationDone) { mParent.sendRequest(ObexHelper.OBEX_OPCODE_GET_FINAL, null, mReplyHeader, mPrivateInput, false); // Regardless of the SRM state, wait for the response. |