since there is no difference between upper case and lower case
for BLE MAC address.
strcmp method should be replaced.
Change-Id: I729a55216551d1062679148bc9511a4fb9164163
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17221
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
- if (!strcmp(setAddress, address))
+ if (!strcasecmp(setAddress, address))
{
(*env)->ReleaseStringUTFChars(env, jni_setAddress, setAddress);
(*env)->DeleteLocalRef(env, jni_setAddress);
{
(*env)->ReleaseStringUTFChars(env, jni_setAddress, setAddress);
(*env)->DeleteLocalRef(env, jni_setAddress);
}
OIC_LOG_V(DEBUG, TAG, "target address : %s, set address : %s", address, setAddress);
}
OIC_LOG_V(DEBUG, TAG, "target address : %s, set address : %s", address, setAddress);
- if (!strcmp(address, setAddress))
+ if (!strcasecmp(address, setAddress))
{
CAResult_t res = CALEClientDisconnect(env, jarrayObj);
if (CA_STATUS_OK != res)
{
CAResult_t res = CALEClientDisconnect(env, jarrayObj);
if (CA_STATUS_OK != res)
- if (!strcmp(remoteAddress, setAddress))
+ if (!strcasecmp(remoteAddress, setAddress))
{
(*env)->ReleaseStringUTFChars(env, jni_setAddress, setAddress);
(*env)->DeleteLocalRef(env, jni_setAddress);
{
(*env)->ReleaseStringUTFChars(env, jni_setAddress, setAddress);
(*env)->DeleteLocalRef(env, jni_setAddress);
return CA_STATUS_FAILED;
}
return CA_STATUS_FAILED;
}
- if (!strcmp(setAddress, remoteAddress))
+ if (!strcasecmp(setAddress, remoteAddress))
{
OIC_LOG_V(DEBUG, TAG, "remove object : %s", remoteAddress);
(*env)->DeleteGlobalRef(env, jarrayObj);
{
OIC_LOG_V(DEBUG, TAG, "remove object : %s", remoteAddress);
(*env)->DeleteGlobalRef(env, jarrayObj);
- if (!strcmp(remoteAddress, setAddress))
+ if (!strcasecmp(remoteAddress, setAddress))
{
OIC_LOG(DEBUG, TAG, "the device is already set");
(*env)->ReleaseStringUTFChars(env, jni_setAddress, setAddress);
{
OIC_LOG(DEBUG, TAG, "the device is already set");
(*env)->ReleaseStringUTFChars(env, jni_setAddress, setAddress);
- if (!strcmp(remoteAddress, setAddress))
+ if (!strcasecmp(remoteAddress, setAddress))
{
OIC_LOG(DEBUG, TAG, "the device is already set");
(*env)->ReleaseStringUTFChars(env, jni_setAddress, setAddress);
{
OIC_LOG(DEBUG, TAG, "the device is already set");
(*env)->ReleaseStringUTFChars(env, jni_setAddress, setAddress);
return CA_STATUS_FAILED;
}
return CA_STATUS_FAILED;
}
- if (!strcmp(setAddress, remoteAddress))
+ if (!strcasecmp(setAddress, remoteAddress))
{
OIC_LOG_V(DEBUG, TAG, "remove object : %s", remoteAddress);
(*env)->DeleteGlobalRef(env, jarrayObj);
{
OIC_LOG_V(DEBUG, TAG, "remove object : %s", remoteAddress);
(*env)->DeleteGlobalRef(env, jarrayObj);
return CA_STATUS_FAILED;
}
return CA_STATUS_FAILED;
}
- if (!strcmp(setAddress, remoteAddress))
+ if (!strcasecmp(setAddress, remoteAddress))
{
OIC_LOG_V(DEBUG, TAG, "remove object : %s", remoteAddress);
(*env)->DeleteGlobalRef(env, jarrayObj);
{
OIC_LOG_V(DEBUG, TAG, "remove object : %s", remoteAddress);
(*env)->DeleteGlobalRef(env, jarrayObj);
}
OIC_LOG_V(DEBUG, TAG, "btAddress : %s (idx: %d)", btAddress, index);
}
OIC_LOG_V(DEBUG, TAG, "btAddress : %s (idx: %d)", btAddress, index);
- if (!strcmp(targetAddress, btAddress))
+ if (!strcasecmp(targetAddress, btAddress))
{
OIC_LOG(DEBUG, TAG, "Found Gatt object from BT device");
{
OIC_LOG(DEBUG, TAG, "Found Gatt object from BT device");
OIC_LOG_V(DEBUG, TAG, "setAddress : %s", setAddress);
OIC_LOG_V(DEBUG, TAG, "address : %s", address);
OIC_LOG_V(DEBUG, TAG, "setAddress : %s", setAddress);
OIC_LOG_V(DEBUG, TAG, "address : %s", address);
- if (!strcmp(setAddress, address))
+ if (!strcasecmp(setAddress, address))
{
OIC_LOG(DEBUG, TAG, "found the device");
{
OIC_LOG(DEBUG, TAG, "found the device");
- if (!strcmp(remoteAddress, setAddress))
+ if (!strcasecmp(remoteAddress, setAddress))
{
OIC_LOG(ERROR, TAG, "the device is already set");
(*env)->ReleaseStringUTFChars(env, jni_setAddress, setAddress);
{
OIC_LOG(ERROR, TAG, "the device is already set");
(*env)->ReleaseStringUTFChars(env, jni_setAddress, setAddress);
- if (!strcmp(setAddress, remoteAddress))
+ if (!strcasecmp(setAddress, remoteAddress))
{
OIC_LOG_V(DEBUG, TAG, "device address : %s", remoteAddress);
{
OIC_LOG_V(DEBUG, TAG, "device address : %s", remoteAddress);
- if (!strcmp(remoteAddress, state->address))
+ if (!strcasecmp(remoteAddress, state->address))
- if (!strcmp(state->address, remoteAddress))
+ if (!strcasecmp(state->address, remoteAddress))
{
OIC_LOG_V(DEBUG, TAG, "remove state : %s", state->address);
{
OIC_LOG_V(DEBUG, TAG, "remove state : %s", state->address);
- if (!strcmp(state->address, remoteAddress))
+ if (!strcasecmp(state->address, remoteAddress))
CALEData_t *bleData = (CALEData_t *) message->msg;
if (bleData && bleData->remoteEndpoint)
{
CALEData_t *bleData = (CALEData_t *) message->msg;
if (bleData && bleData->remoteEndpoint)
{
- if (!strcmp(bleData->remoteEndpoint->addr, address))
+ if (!strcasecmp(bleData->remoteEndpoint->addr, address))
{
OIC_LOG(DEBUG, CALEADAPTER_TAG, "found the message of disconnected device");
if (NULL != queueHandle->destroy)
{
OIC_LOG(DEBUG, CALEADAPTER_TAG, "found the message of disconnected device");
if (NULL != queueHandle->destroy)