Loading obex/javax/obex/ClientOperation.java +34 −15 Original line number Diff line number Diff line Loading @@ -632,8 +632,10 @@ public final class ClientOperation implements Operation, BaseStream { if (mGetOperation) { if (!mOperationDone) { if (!mGetFinalFlag) { mReplyHeader.responseCode = ResponseCodes.OBEX_HTTP_CONTINUE; while ((more) && (mReplyHeader.responseCode == ResponseCodes.OBEX_HTTP_CONTINUE)) { while ((more) && (mReplyHeader.responseCode == ResponseCodes.OBEX_HTTP_CONTINUE)) { more = sendRequest(ObexHelper.OBEX_OPCODE_GET); } // For GET we need to loop until all headers have been sent, Loading @@ -648,6 +650,15 @@ public final class ClientOperation implements Operation, BaseStream { } else { checkForSrm(); } } else { more = sendRequest(ObexHelper.OBEX_OPCODE_GET_FINAL); if (more) { throw new IOException("FINAL_GET forced, data didn't fit into one packet"); } mOperationDone = true; } } } else { // PUT operation Loading Loading @@ -705,7 +716,15 @@ public final class ClientOperation implements Operation, BaseStream { if (mPrivateInput == null) { mPrivateInput = new PrivateInputStream(this); } if (!mGetFinalFlag) { sendRequest(ObexHelper.OBEX_OPCODE_GET); } else { sendRequest(ObexHelper.OBEX_OPCODE_GET_FINAL); } if (mReplyHeader.responseCode != ResponseCodes.OBEX_HTTP_CONTINUE) { mOperationDone = true; } return true; } else if (mOperationDone) { Loading Loading
obex/javax/obex/ClientOperation.java +34 −15 Original line number Diff line number Diff line Loading @@ -632,8 +632,10 @@ public final class ClientOperation implements Operation, BaseStream { if (mGetOperation) { if (!mOperationDone) { if (!mGetFinalFlag) { mReplyHeader.responseCode = ResponseCodes.OBEX_HTTP_CONTINUE; while ((more) && (mReplyHeader.responseCode == ResponseCodes.OBEX_HTTP_CONTINUE)) { while ((more) && (mReplyHeader.responseCode == ResponseCodes.OBEX_HTTP_CONTINUE)) { more = sendRequest(ObexHelper.OBEX_OPCODE_GET); } // For GET we need to loop until all headers have been sent, Loading @@ -648,6 +650,15 @@ public final class ClientOperation implements Operation, BaseStream { } else { checkForSrm(); } } else { more = sendRequest(ObexHelper.OBEX_OPCODE_GET_FINAL); if (more) { throw new IOException("FINAL_GET forced, data didn't fit into one packet"); } mOperationDone = true; } } } else { // PUT operation Loading Loading @@ -705,7 +716,15 @@ public final class ClientOperation implements Operation, BaseStream { if (mPrivateInput == null) { mPrivateInput = new PrivateInputStream(this); } if (!mGetFinalFlag) { sendRequest(ObexHelper.OBEX_OPCODE_GET); } else { sendRequest(ObexHelper.OBEX_OPCODE_GET_FINAL); } if (mReplyHeader.responseCode != ResponseCodes.OBEX_HTTP_CONTINUE) { mOperationDone = true; } return true; } else if (mOperationDone) { Loading