if (true == isSuccess)
{
- OIC_LOG_V(INFO, ANALYZER_TAG, "Send Success, sent length = [%d]", sentLen);
+ OIC_LOG_V(INFO, ANALYZER_TAG, "Send Success, sent length = [%zd]", sentLen);
}
else
{
}
CALogAdapterTypeInfo(adapter);
- OIC_LOG_V(DEBUG, ANALYZER_TAG, "Address = [%s]:[%d]", addr, port);
+ OIC_LOG_V(INFO, ANALYZER_TAG, "Address = [%s]:[%d]", addr, port);
OIC_LOG(DEBUG, ANALYZER_TAG, "=================================================");
// samsung log
size_t *totalLength,
uint16_t mtuSize)
{
- OIC_LOG_V(DEBUG, TAG, "IN, dataLength = %zu, mtu = %zu", dataLength, mtuSize);
+ OIC_LOG_V(DEBUG, TAG, "IN, dataLength = %zd, mtu = %hu", dataLength, mtuSize);
size_t remainDataSize = 0;
size_t dataOnlyLen =
#if defined(__TIZEN__) || defined(__ANDROID__)
// get MTU size
- OIC_LOG_V(INFO, CALEADAPTER_TAG, "Get MTU size using API");
-
-
g_mtuSize = CALEServerGetMtuSize(bleData->remoteEndpoint->addr);
#endif
OIC_LOG_V(INFO, CALEADAPTER_TAG, "MTU size [%d]", g_mtuSize);
OIC_LOG_V(DEBUG,
CALEADAPTER_TAG,
- "Server Sent Unicast First Data - data length [%zu]",
+ "Server Sent Unicast First Data - data length [%u]",
length);
result = CAGenerateHeader(dataHeader,
}
OIC_LOG_V(DEBUG,
CALEADAPTER_TAG,
- "Client Sent Unicast First Data - data length [%zu]",
+ "Client Sent Unicast First Data - data length [%u]",
length);
result = CAGenerateHeader(dataHeader,
}
OIC_LOG_V(DEBUG,
CALEADAPTER_TAG,
- "Client Sent Unicast %d Data - data(mtu) length [%zu]",
+ "Client Sent Unicast %d Data - data(mtu) length [%hu]",
index + 1,
g_mtuSize);
}
VERIFY_NON_NULL(endpoint, CALEADAPTER_TAG, "endpoint is NULL");
VERIFY_NON_NULL(data, CALEADAPTER_TAG, "data is NULL");
OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "IN %s", __func__);
- OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "encrypted datalen = %d", dataLen);
+ OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "encrypted datalen = %zd", dataLen);
CAResult_t result;
CADataType_t dataType = g_dataType;
VERIFY_NON_NULL(data, CALEADAPTER_TAG, "data is NULL");
OIC_LOG_V(DEBUG, CALEADAPTER_TAG,
- "Secure Data Receive - decrypted datalen = %d", dataLen);
+ "Secure Data Receive - decrypted datalen = %zd", dataLen);
if (dataLen <= 0)
{
// Create bleData to add to queue
OIC_LOG_V(DEBUG,
CALEADAPTER_TAG,
- "Data received from LE Client layer [%zu]",
+ "Data received from LE Client layer [%u]",
dataLength);
CALEData_t * const bleData =
OIC_LOG_V(ERROR, TAG, "Recvfrom failed %s", strerror(errno));
return CA_STATUS_FAILED;
}
- OIC_LOG_V(DEBUG, TAG, "recvd %u bytes from recvmsg", recvLen);
+ OIC_LOG_V(DEBUG, TAG, "recvd %zd bytes from recvmsg", recvLen);
if (flags & CA_MULTICAST)
{
}
else
{
- OIC_LOG_V(DEBUG, TAG, "%u bytes required for complete CoAP",
+ OIC_LOG_V(DEBUG, TAG, "%zd bytes required for complete CoAP",
svritem->totalLen - svritem->len);
}
}
OIC_LOG_BUFFER(DEBUG, TAG, data, dataLength);
ssize_t ret = CATCPSendData(endpoint, data, dataLength);
- OIC_LOG_V(DEBUG, TAG, "Out %s : %d bytes sent", __func__, ret);
+ OIC_LOG_V(DEBUG, TAG, "Out %s : %zd bytes sent", __func__, ret);
return ret;
}
#endif
unsigned char *inBuffer = *data;
size_t inLen = *dataLength;
- OIC_LOG_V(DEBUG, TAG, "before-datalength : %u", *dataLength);
+ OIC_LOG_V(DEBUG, TAG, "before-datalength : %zd", *dataLength);
if (NULL == svritem->data && inLen > 0)
{
*data = inBuffer;
*dataLength = inLen;
- OIC_LOG_V(DEBUG, TAG, "after-datalength : %u", *dataLength);
+ OIC_LOG_V(DEBUG, TAG, "after-datalength : %zd", *dataLength);
OIC_LOG_V(DEBUG, TAG, "Out %s", __func__);
return CA_STATUS_OK;
}
//[3][4] bytes in tls header are tls payload length
tlsLength = TLS_HEADER_SIZE +
(size_t)((svritem->tlsdata[3] << 8) | svritem->tlsdata[4]);
- OIC_LOG_V(DEBUG, TAG, "total tls length = %u", tlsLength);
+ OIC_LOG_V(DEBUG, TAG, "total tls length = %zd", tlsLength);
if (tlsLength > TLS_DATA_MAX_SIZE)
{
OIC_LOG_V(ERROR, TAG, "total tls length is too big (buffer size : %u)",
else
{
svritem->tlsLen += len;
- OIC_LOG_V(DEBUG, TAG, "nb_read : %u bytes , recv() : %d bytes, svritem->tlsLen : %u bytes",
+ OIC_LOG_V(DEBUG, TAG, "nb_read : %zd bytes , recv() : %d bytes, svritem->tlsLen : %zd bytes",
nbRead, len, svritem->tlsLen);
if (tlsLength > 0 && tlsLength == svritem->tlsLen)
{
int so_cnt = 0;
while(subOwner)
{
- printf(" [%zu] ", ++so_cnt);
+ printf(" [%d] ", ++so_cnt);
printUuid(&subOwner->uuid);
printf("\n");
subOwner = subOwner->next;
// because we use 3 Cert, 6K is enough size for saving Certs.
if (6144 <= chainSize)
{
- OIC_LOG_V(ERROR, TAG, "chainSize(%u) is invalid", chainSize);
+ OIC_LOG_V(ERROR, TAG, "chainSize(%zd) is invalid", chainSize);
return OC_STACK_INVALID_PARAM;
}
OIC_LOG_BUFFER(DEBUG, TAG, cred->subject.id, sizeof(cred->subject.id));
if (cred->privateData.data)
{
- OIC_LOG_V(DEBUG, TAG, "GenerateCredential : privateData len: %u", cred->privateData.len);
+ OIC_LOG_V(DEBUG, TAG, "GenerateCredential : privateData len: %zd", cred->privateData.len);
OIC_LOG_BUFFER(DEBUG, TAG, cred->privateData.data, cred->privateData.len);
}
#if defined(__WITH_DTLS__) || defined(__WITH_TLS__)
}
if (cred->publicData.data)
{
- OIC_LOG_V(DEBUG, TAG, "GenerateCredential : publicData len: %u", cred->publicData.len);
+ OIC_LOG_V(DEBUG, TAG, "GenerateCredential : publicData len: %zd", cred->publicData.len);
OIC_LOG_BUFFER(DEBUG, TAG, cred->publicData.data, cred->publicData.len);
}
if (cred->optionalData.data)
{
- OIC_LOG_V(DEBUG, TAG, "GenerateCredential : optionalData len: %u", cred->optionalData.len);
+ OIC_LOG_V(DEBUG, TAG, "GenerateCredential : optionalData len: %zd", cred->optionalData.len);
OIC_LOG_BUFFER(DEBUG, TAG, cred->optionalData.data, cred->optionalData.len);
OIC_LOG_V(DEBUG, TAG, "GenerateCredential : optionalData revstat: %d", cred->optionalData.revstat);
}
}
}
- OIC_LOG_V(DEBUG, TAG, "Numer of registered sub-owner=%d", numberOfSubOwner);
+ OIC_LOG_V(DEBUG, TAG, "Numer of registered sub-owner=%zd", numberOfSubOwner);
OIC_LOG_V(DEBUG, TAG, "Out %s", __func__);
return numberOfSubOwner;
}
else
{
- OIC_LOG_V(ERROR, TAG, "Number of sub-owner exceeded : (MAX SIZE=%d)", gMaxSubOwnerSize);
+ OIC_LOG_V(ERROR, TAG, "Number of sub-owner exceeded : (MAX SIZE=%zd)", gMaxSubOwnerSize);
//Close DTLS session
if (CA_STATUS_OK != CAcloseSslSession(endpoint))
#ifdef MULTIPLE_OWNER
if (MAX_SUBOWNER_SIZE < numOfSubOwner || MIN_SUBOWNER_SIZE > numOfSubOwner)
{
- OIC_LOG_V(ERROR, TAG, "Invalid number of sub owner : %d", numOfSubOwner);
+ OIC_LOG_V(ERROR, TAG, "Invalid number of sub owner : %zd", numOfSubOwner);
return OC_STACK_INVALID_PARAM;
}
gMaxSubOwnerSize = numOfSubOwner;
- OIC_LOG_V(DEBUG, TAG, "Number of SubOwner = %d", gMaxSubOwnerSize);
+ OIC_LOG_V(DEBUG, TAG, "Number of SubOwner = %zd", gMaxSubOwnerSize);
OIC_LOG_V(DEBUG, TAG, "Out %s", __func__);
return OC_STACK_OK;
#else
exit:
mbedtls_x509_crt_free(&deviceCert);
OICFree(derCrtBufTmp);
- OIC_LOG_V(DEBUG, TAG, "Cert chain length = %u", *crtBufLen);
+ OIC_LOG_V(DEBUG, TAG, "Cert chain length = %zd", *crtBufLen);
OIC_LOG_V(DEBUG, TAG, "Out %s", __func__);
}
// check and fix invalid cert signature
CheckInvalidDERSignature(inf->crt.data, &inf->crt.len);
- OIC_LOG_V(INFO, TAG, "Cert chain length = %u", inf->crt.len);
+ OIC_LOG_V(INFO, TAG, "Cert chain length = %zd", inf->crt.len);
OIC_LOG_V(INFO, TAG, "Out %s", __func__);
return true;
}