Issue : If scan fails once and if we retry from above layer then scan is not started.
Cause : Scan was not started for device which is already added once in server list.
Fix : Changed logic by enabling scan for devices which are already added and in UNICAST_PENDING state
https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/412
(cherry picked from
3106e414dbe8807c50b439cc19e6b94e86ab50ac)
Change-Id: I5c18ed79099e0f4245fd8b75a7191459bd0357ec
Signed-off-by: Kush Agrawal <kush.agrawal@samsung.com>
Signed-off-by: Abhishek Sansanwal <abhishek.s94@samsung.com>
OIC_LOG(ERROR, TAG, "Could not add data to pending list");
return CA_STATUS_FAILED;
}
+ }
+ if(serverInfo->status == LE_STATUS_UNICAST_PENDING)
+ {
oc_mutex_lock(g_scanMutex);
if (!g_isMulticastInProgress && !g_isUnicastScanInProgress)
{
OIC_LOG(ERROR, TAG, "Could not add data to pending list");
return CA_STATUS_FAILED;
}
+ }
+ if(serverInfo->status == LE_STATUS_UNICAST_PENDING)
+ {
oc_mutex_lock(g_scanMutex);
if (!g_isMulticastInProgress && !g_isUnicastScanInProgress)
{