Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9713076 authored by Smriti Gupta's avatar Smriti Gupta Committed by Steve Kondik
Browse files

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
parent 734d35c5
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -723,12 +723,14 @@ public final class ClientOperation implements Operation, BaseStream {
                    mReplyHeader.responseCode = ResponseCodes.OBEX_HTTP_CONTINUE;
                    mReplyHeader.responseCode = ResponseCodes.OBEX_HTTP_CONTINUE;
                }
                }


                while (mReplyHeader.responseCode == ResponseCodes.OBEX_HTTP_CONTINUE) {
                while ((mReplyHeader.responseCode == ResponseCodes.OBEX_HTTP_CONTINUE)
                    && !mOperationDone) {
                    if (!sendRequest(0x83)) {
                    if (!sendRequest(0x83)) {
                        break;
                        break;
                    }
                    }
                }
                }
                while (mReplyHeader.responseCode == ResponseCodes.OBEX_HTTP_CONTINUE) {
                while ((mReplyHeader.responseCode == ResponseCodes.OBEX_HTTP_CONTINUE) &&
                    !mOperationDone) {
                    mParent.sendRequest(0x83, null, mReplyHeader, mPrivateInput);
                    mParent.sendRequest(0x83, null, mReplyHeader, mPrivateInput);
                }
                }
                mOperationDone = true;
                mOperationDone = true;