From: Jee Hyeok Kim Date: Mon, 22 May 2017 08:22:57 +0000 (+0900) Subject: Revert cloud sign-up response behavior X-Git-Tag: 1.3.0~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cbdd3c03cbac1ab488dca859a65e1dd5d9055402;p=platform%2Fupstream%2Fiotivity.git Revert cloud sign-up response behavior 1. Revert cloud behavior not to disconnect client after cloud sends sign-up response to client. Change-Id: I367dfe4ebe16567ada67ae2f7aac8b8a4c0f5db2 Signed-off-by: Jee Hyeok Kim Reviewed-on: https://gerrit.iotivity.org/gerrit/20225 Reviewed-by: Uze Choi --- diff --git a/cloud/interface/src/main/java/org/iotivity/cloud/ciserver/DeviceServerSystem.java b/cloud/interface/src/main/java/org/iotivity/cloud/ciserver/DeviceServerSystem.java index 88ccf47..4bbde23 100644 --- a/cloud/interface/src/main/java/org/iotivity/cloud/ciserver/DeviceServerSystem.java +++ b/cloud/interface/src/main/java/org/iotivity/cloud/ciserver/DeviceServerSystem.java @@ -67,8 +67,8 @@ import io.netty.channel.ChannelPromise; public class DeviceServerSystem extends ServerSystem { - private Cbor> mCbor = new Cbor>(); - private HashMap mCsmMap = new HashMap<>(); + private Cbor> mCbor = new Cbor>(); + private HashMap mCsmMap = new HashMap<>(); /** * @@ -179,14 +179,15 @@ public class DeviceServerSystem extends ServerSystem { switch (coapRequest.getObserve()) { case SUBSCRIBE: coapDevice.addObserveRequest( - Bytes.bytesToLong(coapRequest.getToken()), + Bytes.bytesToLong( + coapRequest.getToken()), coapRequest); coapDevice.addObserveChannel(targetChannel); break; case UNSUBSCRIBE: coapDevice.removeObserveChannel(targetChannel); - coapDevice.removeObserveRequest( - Bytes.bytesToLong(coapRequest.getToken())); + coapDevice.removeObserveRequest(Bytes + .bytesToLong(coapRequest.getToken())); break; default: break; @@ -291,10 +292,11 @@ public class DeviceServerSystem extends ServerSystem { StringBuffer uriPath = new StringBuffer(); uriPath.append("/" + Constants.PREFIX_OIC); uriPath.append("/" + Constants.DEVICE_PRESENCE_URI); - ConnectorPool.getConnection("rd").sendRequest(MessageBuilder.createRequest( - RequestMethod.POST, uriPath.toString(), null, - ContentFormat.APPLICATION_CBOR, - cbor.encodingPayloadToCbor(payload)), null); + ConnectorPool.getConnection("rd") + .sendRequest(MessageBuilder.createRequest( + RequestMethod.POST, uriPath.toString(), null, + ContentFormat.APPLICATION_CBOR, + cbor.encodingPayloadToCbor(payload)), null); } } @@ -334,11 +336,10 @@ public class DeviceServerSystem extends ServerSystem { } switch (urlPath) { - - case OICConstants.ACCOUNT_FULL_URI: - ctx.writeAndFlush(msg); - ctx.close(); - return; + /* + * case OICConstants.ACCOUNT_FULL_URI: + * ctx.writeAndFlush(msg); ctx.close(); return; + */ case OICConstants.ACCOUNT_SESSION_FULL_URI: HashMap payloadData = mCbor