From 40f1a0f47e270d611fc8349276a87daba8ec4a60 Mon Sep 17 00:00:00 2001 From: Jung Seungho Date: Mon, 31 Oct 2016 09:58:36 +0900 Subject: [PATCH] [IOT-1533] fixed KeepAlive resource for receiving PUT, POST Message Change-Id: Ie52fe040cd11319a34219efc942a2e102663ecba Signed-off-by: Jung Seungho Reviewed-on: https://gerrit.iotivity.org/gerrit/13847 Reviewed-by: Hyuna Jo Tested-by: jenkins-iotivity Reviewed-by: Jee Hyeok Kim --- .../org/iotivity/cloud/ciserver/resources/KeepAliveResource.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cloud/interface/src/main/java/org/iotivity/cloud/ciserver/resources/KeepAliveResource.java b/cloud/interface/src/main/java/org/iotivity/cloud/ciserver/resources/KeepAliveResource.java index 5432f9a..8e89806 100644 --- a/cloud/interface/src/main/java/org/iotivity/cloud/ciserver/resources/KeepAliveResource.java +++ b/cloud/interface/src/main/java/org/iotivity/cloud/ciserver/resources/KeepAliveResource.java @@ -67,11 +67,12 @@ public class KeepAliveResource extends Resource { switch (request.getMethod()) { case GET: - response = handleGetPingConfig(request); + response = handlePingConfig(request); break; case PUT: - response = handlePutPingConfig(srcDevice, request); + case POST: + response = handlePingConfig(srcDevice, request); break; default: @@ -96,7 +97,7 @@ public class KeepAliveResource extends Resource { * @param request * ChannelHandlerContext of request message */ - private IResponse handleGetPingConfig(IRequest request) { + private IResponse handlePingConfig(IRequest request) { HashMap payloadData = new HashMap<>(); payloadData.put(Constants.REQ_PING_ARRAY, mIntervals); @@ -106,7 +107,7 @@ public class KeepAliveResource extends Resource { mCbor.encodingPayloadToCbor(payloadData)); } - private IResponse handlePutPingConfig(Device srcDevice, IRequest request) { + private IResponse handlePingConfig(Device srcDevice, IRequest request) { HashMap payloadData = mCbor .parsePayloadFromCbor(request.getPayload(), HashMap.class); -- 2.7.4