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
This commit is contained in:
Hemant Gupta
2014-05-30 22:25:20 +05:30
committed by Andre Eisenbach
parent 89942588b7
commit 50ba032f4a

View File

@@ -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.