(*env)->ReleaseStringUTFChars(env, address, remoteAddress);
(*env)->DeleteGlobalRef(env, jarrayObj);
- CAResult_t res = CALEServerReorderinglist(index);
- if (CA_STATUS_OK != res)
+ if (NULL == u_arraylist_remove(g_connectedDeviceList, index))
{
- OIC_LOG(ERROR, TAG, "CALEServerReorderinglist has failed");
+ OIC_LOG(ERROR, TAG, "List removal failed.");
ca_mutex_unlock(g_connectedDeviceListMutex);
- return res;
+ return CA_STATUS_FAILED;
}
ca_mutex_unlock(g_connectedDeviceListMutex);
return CA_STATUS_OK;
return CA_STATUS_FAILED;
}
-CAResult_t CALEServerReorderinglist(uint32_t index)
-{
- if (u_arraylist_remove(g_connectedDeviceList, index) == NULL)
- {
- OIC_LOG(ERROR, TAG, "List removal failed.");
- return CA_STATUS_FAILED;
- }
- else
- {
- return CA_STATUS_OK;
- }
-}
-
JNIEXPORT void JNICALL
Java_org_iotivity_ca_CaLeServerInterface_caLeRegisterGattServerCallback(JNIEnv *env, jobject obj,
jobject callback)