From 654b5e25cd22fe62c4ce03627da49865ced1b3af Mon Sep 17 00:00:00 2001 From: Jay Sharma Date: Mon, 21 Mar 2016 09:07:25 +0530 Subject: [PATCH] [Easy-setup] Commented check for Intended resource - commented the condition for checking the intended resource in RemoteEnrolleeResource class. Change-Id: I937c07d151eb503e238215ec60abe69ba83dde14 Signed-off-by: Jay Sharma Reviewed-on: https://gerrit.iotivity.org/gerrit/6075 Tested-by: jenkins-iotivity Reviewed-by: Madan Lanka (cherry picked from commit a0aa322df9df6e677cdbc8bc9afcc1bb09cb0862) Reviewed-on: https://gerrit.iotivity.org/gerrit/6121 --- .../richsdk/src/RemoteEnrolleeResource.cpp | 26 +++++++--------------- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/service/easy-setup/mediator/richsdk/src/RemoteEnrolleeResource.cpp b/service/easy-setup/mediator/richsdk/src/RemoteEnrolleeResource.cpp index 1a6a1ae..f3414f6 100755 --- a/service/easy-setup/mediator/richsdk/src/RemoteEnrolleeResource.cpp +++ b/service/easy-setup/mediator/richsdk/src/RemoteEnrolleeResource.cpp @@ -266,24 +266,14 @@ namespace OIC OIC_LOG_V (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, "Host address of the resource: %s", hostAddress.c_str()); - std::size_t foundIP = - hostAddress.find( - std::string(m_wifiOnboardingconn.ipAddress)); - - if(resourceURI == ES_PROV_RES_URI && foundIP!=std::string::npos) - { - m_ocResource = resource; - m_discoveryResponse = true; - - OIC_LOG (DEBUG, ES_REMOTE_ENROLLEE_RES_TAG, - "Found the device with the resource"); - - return; - } - else - { - OIC_LOG (ERROR, ES_REMOTE_ENROLLEE_RES_TAG, "NOT the intended resource."); - } + /* + * Easysetup is always performed with a single Enrollee device and + * in a private network (SoftAP or BLE), so the assumption is that + * only the intended device will respond for the discovery. + * With the above assumption the below two statements are written. + */ + m_ocResource = resource; + m_discoveryResponse = true; } else { -- 2.7.4