Commit db6ac717 authored by Kevin Kane's avatar Kevin Kane

Merge branch 'master' into iot-1785

Change-Id: If30ba205d4fcb0b5dc969f83d464509a8059ef3f
Signed-off-by: default avatarKevin Kane <kkane@microsoft.com>
parents 1227979b 65f82152
......@@ -31,7 +31,7 @@ message to install tinycbor)
('<iotivity>' is the path to 'iotivity' project. If your device is x86, arm,
or arm64, please change 'x86_64' to the proper arch)
3. To build and test IoTivity with Security enabled (required for certification)
3. To build and test IoTivity with Security enabled (required for certification)
follow the instructions found in:
<iotivity>/resource/csdk/security/README-building-and-running-secure-IoTivity-stack.txt
......@@ -286,6 +286,13 @@ See run.bat for more example usage parameters
* SIMULATOR=true or false (Build with simulator module)
* Possible values for <WITH_MQ> are: PUB,SUB,BROKER (Build including Message Queue)
-> PUB : publisher, SUB : subscriber, BROKER : MQ broker(not supported yet)
* LOG_LEVEL=DEBUG or INFO or WARNING or ERROR or FATAL
(select log level to print, LOGGING option should be true)
ex) LOG_LEVEL=DEBUG : All logs including DEBUG, INFO, WARNING, ERROR, FATAL level is printed.
LOG_LEVEL=INFO : The logs including INFO, WARNING, ERROR, FATAL level is printed.
LOG_LEVEL=WARNING : The logs including WARNING, ERROR, FATAL level is printed.
LOG_LEVEL=ERROR : The logs including ERROR, FATAL level is printed.
LOG_LEVEL=FATAL : FATAL level is printed.
Note:
1) for convenience, a script (auto_build.sh) is provided to run possible build
......
......@@ -121,6 +121,7 @@ help_vars.Add(EnumVariable('MULTIPLE_OWNER', 'Enable multiple owner', '0', allow
help_vars.Add(EnumVariable('EXC_PROV_SUPPORT', 'Except OCPMAPI library(libocpmapi.so)', '0', allowed_values=('0', '1')))
help_vars.Add(EnumVariable('TEST', 'Run unit tests', '0', allowed_values=('0', '1')))
help_vars.Add(BoolVariable('LOGGING', 'Enable stack logging', logging_default))
help_vars.Add(EnumVariable('LOG_LEVEL', 'Enable stack logging level', 'DEBUG', allowed_values=('DEBUG', 'INFO', 'ERROR', 'WARNING', 'FATAL')))
help_vars.Add(BoolVariable('UPLOAD', 'Upload binary ? (For Arduino)', require_upload))
help_vars.Add(EnumVariable('ROUTING', 'Enable routing', 'EP', allowed_values=('GW', 'EP')))
help_vars.Add(EnumVariable('BUILD_SAMPLE', 'Build with sample', 'ON', allowed_values=('ON', 'OFF')))
......@@ -137,6 +138,7 @@ if target_os == 'windows':
help_vars.Add(BoolVariable('BUILD_JAVA', 'Build Java bindings', False))
help_vars.Add(PathVariable('JAVA_HOME', 'JDK directory', os.environ.get('JAVA_HOME'), PathVariable.PathAccept))
help_vars.Add(EnumVariable('OIC_SUPPORT_TIZEN_TRACE', 'Tizen Trace(T-trace) api availability', 'False', allowed_values=('True', 'False')))
AddOption('--prefix',
dest='prefix',
......
......@@ -23,6 +23,7 @@ env.AppendUnique(CCFLAGS = ['-Wextra', '-fPIC'])
env.AppendUnique(LIBS = ['dl', 'pthread'])
env.AppendUnique(CCFLAGS = ['-D__TIZEN__', '-D_GNU_SOURCE', '-DTIZEN_DEBUG_ENABLE'])
env.ParseConfig("pkg-config dlog ttrace --cflags --libs")
env.ParseConfig("pkg-config dlog --cflags --libs")
if env.get('OIC_SUPPORT_TIZEN_TRACE') == 'True':
env.ParseConfig("pkg-config ttrace --cflags --libs")
# Set arch flags : It will be handled by Tizen build system.
......@@ -16,11 +16,16 @@ if env['CC'] == 'cl':
# - It is an acceptable approach for variable size structs.
# - warning C4201: nameless struct/union
# - Disabled due to IoTivity not being ANSI compatible
# - warning C4204: nonstandard extension used: non-constant aggregate initializer
# - Disabled due to IoTivity not being ANSI compatible and this is an appropriate way to intialize
# structs for non-legacy compilers.
# - warning C4214: bit field types other than int
# - Disabled due to IoTivity not being ANSI compatible
# - warning C4232: nonstandard extension used: 'read': address of dllimport 'fread' is not static, identity not guaranteed
# - fread, frwrite, etc are provided by the platform and cannot be changed.
# - warning C4706: assignment within conditional expression
# - Disabled due to the widespread usage in IoTivity and low impact.
env.AppendUnique(CCFLAGS=['/wd4127', '/wd4200', '/wd4201', '/wd4214', '/wd4706'])
env.AppendUnique(CCFLAGS=['/wd4127', '/wd4200', '/wd4201', '/wd4204', '/wd4214', '/wd4232', '/wd4706'])
env.AppendUnique(CCFLAGS=['/EHsc'])
......
......@@ -49,7 +49,7 @@ os.chdir(mbedtls_dir)
# the mbedtls_revision tag selected is the same as in extlibs/mbedtls/prep.sh.
# This code also assumes mbedtls_revision is a tag; if it changes to
# a branch or an arbitrary commit, disable this check below.
if target_os != 'tizen':
if os.path.exists('.git/HEAD'):
out = subprocess.check_output('git tag -l ' + mbedtls_revision, shell = True)
if mbedtls_revision not in out:
print out
......
#!/bin/bash
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
set -e
[ ! -z ${EXEC_MODE} ] || EXEC_MODE=false
# Right now this script assumes packageRevision is a tag
# comment out the second clause if packageRevision becomes a branch or a specific commit.
package="rapidjson"
packageRevision="v1.0.2"
packageUrl="https://github.com/miloyip/rapidjson"
packageDir="extlibs/${package}/${package}"
do_()
{
set +f
if $EXEC_MODE; then
echo "warning: fetching online resources may not be reproductible"
printf "%s \n" "trying: \"$@\""
eval "$@"
else
cat<<EOF
error: Something should be prepared, please manually execute from shell
EOF
printf "%s \n" "$@"
exit 1
fi
}
main_()
{
if [ ! -d "${packageDir}" ]; then
do_ "git clone ${packageUrl} ${packageDir} -b ${packageRevision}"
elif [ ! -z $(git tag -l "${packageRevision}") ]; then
cat<<EOF
error: $packageDir is unaligned with supported release of ${package}
Please update ${package} using "cd ${packageDir} && git fetch"
For more support please refer to:
https://wiki.iotivity.org/build
EOF
exit 2
elif [ -d "${packageDir}/.git" ]; then
cd "${packageDir}"
git reset --hard "${packageRevision}"
git apply --whitespace=fix "../ocf.patch"
cd -
rm -rf -- "${packageDir}/.git"
else
echo "log: Assuming ${package} is already on correct revision: \"${packageRevision}\""
fi
}
main_ "$@"
......@@ -13,6 +13,8 @@ URL: https://www.iotivity.org
Requires:
Libs: -L${libdir} -loc -loc_logger -loc_logger_core -loctbstack -lconnectivity_abstraction @LIBS@
Cflags: -I${includedir}/resource \
-I${includedir}/resource/stack \
-I${includedir}/resource/oc_logger \
-I${includedir}/c_common \
-I${svcincludedir}/easy-setup \
-I${svcincludedir}/notification \
......
......@@ -77,7 +77,7 @@ public final class OcPlatform {
private static volatile boolean sIsPlatformInitialized = false;
private static QualityOfService sPlatformQualityOfService = QualityOfService.NA;
private static volatile boolean sIsStopPlatform = false;
private static volatile boolean sIsStopPlatform = true;
private OcPlatform() {
}
......@@ -91,12 +91,6 @@ public final class OcPlatform {
* @param platformConfig platform configuration
*/
public synchronized static void Configure(PlatformConfig platformConfig) {
if (sIsStopPlatform)
{
OcPlatform.start();
sIsStopPlatform = false;
}
if (!sIsPlatformInitialized) {
CaInterface.initialize(platformConfig.getActivity(), platformConfig.getContext());
......@@ -114,6 +108,12 @@ public final class OcPlatform {
sIsPlatformInitialized = true;
}
if (sIsStopPlatform)
{
OcPlatform.start();
sIsStopPlatform = false;
}
}
private static native void configure(int serviceType,
......
......@@ -71,7 +71,7 @@ public final class OcPlatform {
private static volatile boolean sIsPlatformInitialized = false;
private static QualityOfService sPlatformQualityOfService = QualityOfService.NA;
private static volatile boolean sIsStopPlatform = false;
private static volatile boolean sIsStopPlatform = true;
private OcPlatform() {
}
......@@ -85,12 +85,6 @@ public final class OcPlatform {
* @param platformConfig platform configuration
*/
public synchronized static void Configure(PlatformConfig platformConfig) {
if (sIsStopPlatform)
{
OcPlatform.start();
sIsStopPlatform = false;
}
if (!sIsPlatformInitialized) {
CaInterface.initialize();
......@@ -108,6 +102,12 @@ public final class OcPlatform {
sIsPlatformInitialized = true;
}
if (sIsStopPlatform)
{
OcPlatform.start();
sIsStopPlatform = false;
}
}
private static native void configure(int serviceType,
......
......@@ -58,6 +58,7 @@
#include <stdio.h>
#include <stdbool.h>
#include <assert.h>
#include <ctype.h>
#define OC_MIN(A,B) ((A)<(B)?(A):(B))
......
......@@ -101,4 +101,11 @@
# define SIZE_MAX ((size_t)-1)
#endif
#ifdef WITH_ARDUINO
/**
* UINT16_MAX does not appear to be defined on Arduino so we define it here.
*/
# define UINT16_MAX 65535
#endif
#endif
File mode changed from 100755 to 100644
......@@ -28,9 +28,12 @@ Source0: http://mirrors.kernel.org/%{name}/%{version}/%{name}-%{version}.tar.gz
%{!?TARGET_TRANSPORT: %define TARGET_TRANSPORT IP}
%{!?VERBOSE: %define VERBOSE 1}
%{!?WITH_TCP: %define WITH_TCP 0}
%{!?OIC_SUPPORT_TIZEN_TRACE: %define OIC_SUPPORT_TIZEN_TRACE False}
BuildRequires: pkgconfig(dlog)
%if "%{OIC_SUPPORT_TIZEN_TRACE}" == "True"
BuildRequires: pkgconfig(ttrace)
%endif
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(capi-network-connection)
BuildRequires: pkgconfig(capi-network-bluetooth)
......@@ -57,6 +60,7 @@ scons %{JOB} \
TARGET_TRANSPORT=%{TARGET_TRANSPORT} \
VERBOSE=%{VERBOSE} \
WITH_TCP=%{WITH_TCP} \
OIC_SUPPORT_TIZEN_TRACE=%{OIC_SUPPORT_TIZEN_TRACE} \
#eol
......
......@@ -20,7 +20,9 @@ else:
if env.get('LOGGING'):
env.AppendUnique(CPPDEFINES = ['TB_LOG'])
env.ParseConfig("pkg-config --cflags --libs capi-network-connection dlog ttrace glib-2.0")
env.ParseConfig("pkg-config --cflags --libs capi-network-connection dlog glib-2.0")
if env.get('OIC_SUPPORT_TIZEN_TRACE') == 'True':
env.ParseConfig("pkg-config --cflags --libs ttrace")
if 'ALL' in transport:
env.AppendUnique(CPPDEFINES = ['WIFI_ADAPTER', 'NO_ETHERNET_ADAPTER','EDR_ADAPTER','LE_ADAPTER'])
print "CA Transport is ALL"
......
......@@ -176,14 +176,14 @@ static CAErrorHandleCallback g_errorHandler = NULL;
/**
* Callback to receive decrypted data from the ssl adapter.
*/
static void CALESecureReceiveDataCB(const CASecureEndpoint_t *endpoint,
const void *data, uint32_t dataLength);
static void CALESecureReceiveDataCB(const CASecureEndpoint_t *sep,
const void *data, size_t dataLen);
/**
* Callback to receive encrypted data from the ssl adapter.
*/
static void CALESecureSendDataCB(CAEndpoint_t *endpoint,
const void *data, uint32_t dataLength);
static ssize_t CALESecureSendDataCB(CAEndpoint_t *endpoint,
const void *data, size_t dataLen);
#endif
#ifdef SINGLE_THREAD
......@@ -901,16 +901,25 @@ static void CALEDataReceiverHandler(void *threadData, CABLEAdapter_t receiverTyp
oc_mutex bleReceiveDataMutex = NULL;
bool dataBleReceiverHandlerState = false;
#ifdef __WITH_DTLS__
CADataType_t dataType = CA_REQUEST_DATA;
#endif
switch (receiverType)
{
case ADAPTER_CLIENT:
bleReceiveDataMutex = g_bleClientReceiveDataMutex;
dataBleReceiverHandlerState = g_dataBleClientReceiverHandlerState;
#ifdef __WITH_DTLS__
dataType = CA_REQUEST_DATA;
#endif
break;
case ADAPTER_SERVER:
bleReceiveDataMutex = g_bleServerReceiveDataMutex;
dataBleReceiverHandlerState = g_dataBleServerReceiverHandlerState;
#ifdef __WITH_DTLS__
dataType = CA_RESPONSE_DATA;
#endif
break;
default:
OIC_LOG_V(ERROR, CALEADAPTER_TAG, "Unsupported receiver type : %d", receiverType);
......@@ -1150,6 +1159,8 @@ static void CALEDataReceiverHandler(void *threadData, CABLEAdapter_t receiverTyp
if (CA_SECURE & tmp.endpoint.flags)
{
OIC_LOG(ERROR, CALEADAPTER_TAG, "Secure data received");
g_dataType = dataType;
if (CA_STATUS_FAILED == CAdecryptSsl(&tmp,
senderInfo->defragData,
senderInfo->recvDataLen))
......@@ -2731,10 +2742,11 @@ static CAResult_t CALEAdapterGattClientStop()
}
#ifdef __WITH_DTLS__
static void CALESecureSendDataCB(CAEndpoint_t *endpoint, const void *data, uint32_t dataLen)
static ssize_t CALESecureSendDataCB(CAEndpoint_t *endpoint,
const void *data, size_t dataLen)
{
VERIFY_NON_NULL_VOID(endpoint, CALEADAPTER_TAG, "endpoint is NULL");
VERIFY_NON_NULL_VOID(data, CALEADAPTER_TAG, "data is NULL");
VERIFY_NON_NULL_RET(endpoint, CALEADAPTER_TAG, "endpoint is NULL", 0);
VERIFY_NON_NULL_RET(data, CALEADAPTER_TAG, "data is NULL", 0);
OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "Secure Data Send - encrypted datalen = %d", dataLen);
......@@ -2749,10 +2761,11 @@ static void CALESecureSendDataCB(CAEndpoint_t *endpoint, const void *data, uint3
{
OIC_LOG(ERROR, CALEADAPTER_TAG, "Send unicast data for server failed" );
if (g_errorHandler)
{
g_errorHandler(endpoint, data, dataLen, result);
}
if (g_errorHandler)
{
g_errorHandler(endpoint, data, dataLen, result);
}
return 0;
}
}
else if (ADAPTER_CLIENT == g_adapterType ||
......@@ -2764,22 +2777,25 @@ static void CALESecureSendDataCB(CAEndpoint_t *endpoint, const void *data, uint3
{
OIC_LOG(ERROR, CALEADAPTER_TAG, "Send unicast data for client failed" );
if (g_errorHandler)
{
g_errorHandler(endpoint, data, dataLen, result);
}
if (g_errorHandler)
{
g_errorHandler(endpoint, data, dataLen, result);
}
return 0;
}
}
else
{
OIC_LOG_V(ERROR, CALEADAPTER_TAG,
"Can't Send Message adapterType = %d, dataType = %d", g_adapterType, dataType);
return 0;
}
OIC_LOG(DEBUG, CALEADAPTER_TAG, "OUT");
return (ssize_t)dataLen;
}
void CALESecureReceiveDataCB(const CASecureEndpoint_t *sep, const void *data,
uint32_t dataLen)
static void CALESecureReceiveDataCB(const CASecureEndpoint_t *sep,
const void *data, size_t dataLen)
{
OIC_LOG(DEBUG, CALEADAPTER_TAG, "IN");
......@@ -2788,8 +2804,21 @@ void CALESecureReceiveDataCB(const CASecureEndpoint_t *sep, const void *data,
OIC_LOG_V(DEBUG, CALEADAPTER_TAG, "Secure Data Receive - decrypted datalen = %d", dataLen);
if (dataLen <= 0)
{
OIC_LOG(ERROR, CALEADAPTER_TAG, "incorrect dataLen, derecypt fail !");
return;
}
OIC_LOG_BUFFER(DEBUG, CALEADAPTER_TAG, data, dataLen);
if (g_networkPacketReceivedCallback)
{
OIC_LOG_V(DEBUG, CALEADAPTER_TAG,
"[CALESecureReceiveDataCB] Secure flags = %d, %x",
sep->endpoint.flags, sep->endpoint.flags);
OIC_LOG(DEBUG, CALEADAPTER_TAG,
"[CALESecureReceiveDataCB] Received data up !");
g_networkPacketReceivedCallback(sep, data, dataLen);
}
}
......
......@@ -1406,8 +1406,7 @@ CAResult_t CAAddBlockOption(coap_pdu_t **pdu, const CAInfo_t *info,
VERIFY_NON_NULL(options, TAG, "options");
VERIFY_TRUE(((*pdu)->transport_hdr->udp.token_length <= UINT8_MAX), TAG,
"pdu->transport_hdr->udp.token_length");
VERIFY_TRUE((info->payloadSize <= COAP_MAX_PDU_SIZE), TAG,
"info->payloadSize");
VERIFY_TRUE((info->payloadSize <= UINT_MAX), TAG, "info->payloadSize");
CAResult_t res = CA_STATUS_OK;
unsigned int dataLength = 0;
......@@ -1526,7 +1525,7 @@ CAResult_t CAAddBlockOption2(coap_pdu_t **pdu, const CAInfo_t *info, size_t data
VERIFY_NON_NULL(info, TAG, "info");
VERIFY_NON_NULL(blockID, TAG, "blockID");
VERIFY_NON_NULL(options, TAG, "options");
VERIFY_TRUE((dataLength <= COAP_MAX_PDU_SIZE), TAG, "dataLength");
VERIFY_TRUE((dataLength <= UINT_MAX), TAG, "dataLength");
// get set block data from CABlock list-set.
coap_block_t *block1 = CAGetBlockOption(blockID, COAP_OPTION_BLOCK1);
......@@ -1633,7 +1632,7 @@ CAResult_t CAAddBlockOption1(coap_pdu_t **pdu, const CAInfo_t *info, size_t data
VERIFY_NON_NULL(info, TAG, "info");
VERIFY_NON_NULL(blockID, TAG, "blockID");
VERIFY_NON_NULL(options, TAG, "options");
VERIFY_TRUE((dataLength <= COAP_MAX_PDU_SIZE), TAG, "dataLength");
VERIFY_TRUE((dataLength <= UINT_MAX), TAG, "dataLength");
// get set block data from CABlock list-set.
coap_block_t *block1 = CAGetBlockOption(blockID, COAP_OPTION_BLOCK1);
......
......@@ -417,7 +417,9 @@ static void CAReceiveThreadProcess(void *threadData)
{
#ifndef SINGLE_HANDLE
CAData_t *data = (CAData_t *) threadData;
OIC_TRACE_BEGIN(%s:CAProcessReceivedData, TAG);
CAProcessReceivedData(data);
OIC_TRACE_END();
#else
(void)threadData;
#endif
......@@ -503,8 +505,6 @@ static CAResult_t CAProcessSendData(const CAData_t *data)
VERIFY_NON_NULL(data, TAG, "data");
VERIFY_NON_NULL(data->remoteEndpoint, TAG, "remoteEndpoint");
OIC_TRACE_BEGIN(%s:CAProcessSendData, TAG);
CAResult_t res = CA_STATUS_FAILED;
CASendDataType_t type = data->type;
......@@ -551,7 +551,6 @@ static CAResult_t CAProcessSendData(const CAData_t *data)
else
{
OIC_LOG(DEBUG, TAG, "request info, response info is empty");
OIC_TRACE_END();
return CA_STATUS_INVALID_PARAM;
}
......@@ -573,7 +572,6 @@ static CAResult_t CAProcessSendData(const CAData_t *data)
CAErrorHandler(data->remoteEndpoint, pdu->transport_hdr, pdu->length, res);
coap_delete_list(options);
coap_delete_pdu(pdu);
OIC_TRACE_END();
return res;
}
}
......@@ -589,7 +587,6 @@ static CAResult_t CAProcessSendData(const CAData_t *data)
CAErrorHandler(data->remoteEndpoint, pdu->transport_hdr, pdu->length, res);
coap_delete_list(options);
coap_delete_pdu(pdu);
OIC_TRACE_END();
return res;
}
......@@ -615,7 +612,6 @@ static CAResult_t CAProcessSendData(const CAData_t *data)
OIC_LOG_V(INFO, TAG, "retransmission is not enabled due to error, res : %d", res);
coap_delete_list(options);
coap_delete_pdu(pdu);
OIC_TRACE_END();
return res;
}
}
......@@ -627,7 +623,6 @@ static CAResult_t CAProcessSendData(const CAData_t *data)
{
OIC_LOG(ERROR,TAG,"Failed to generate unicast PDU");
CASendErrorInfo(data->remoteEndpoint, info, CA_SEND_FAILED);
OIC_TRACE_END();
return CA_SEND_FAILED;
}
}
......@@ -665,7 +660,7 @@ static CAResult_t CAProcessSendData(const CAData_t *data)
CAProcessMulticastData(data);
#endif
}
OIC_TRACE_END();
return CA_STATUS_OK;
}
......@@ -673,7 +668,9 @@ static CAResult_t CAProcessSendData(const CAData_t *data)
static void CASendThreadProcess(void *threadData)
{
CAData_t *data = (CAData_t *) threadData;
OIC_TRACE_BEGIN(%s:CAProcessSendData, TAG);
CAProcessSendData(data);
OIC_TRACE_END();
}
#endif
......@@ -744,7 +741,6 @@ static void CAReceivedPacketCallback(const CASecureEndpoint_t *sep,
{
VERIFY_NON_NULL_VOID(sep, TAG, "remoteEndpoint");
VERIFY_NON_NULL_VOID(data, TAG, "data");
OIC_TRACE_BEGIN(%s:CAReceivedPacketCallback, TAG);
if (0 == dataLen)
......@@ -1370,6 +1366,7 @@ static void CALogPDUInfo(const CAData_t *data, const coap_pdu_t *pdu)
VERIFY_NON_NULL_VOID(data, TAG, "data");
VERIFY_NON_NULL_VOID(pdu, TAG, "pdu");
OIC_TRACE_BEGIN(%s:CALogPDUInfo, TAG);
OIC_LOG(DEBUG, ANALYZER_TAG, "=================================================");
if(SEND_TYPE_MULTICAST == data->type)
......@@ -1448,7 +1445,10 @@ static void CALogPDUInfo(const CAData_t *data, const coap_pdu_t *pdu)
{
OIC_LOG(DEBUG, ANALYZER_TAG, "Coap Token");
OIC_LOG_BUFFER(DEBUG, ANALYZER_TAG, (const uint8_t *) info->token, info->tokenLength);
OIC_TRACE_BUFFER("OIC_CA_MSG_HANDLE:CALogPDUInfo:token:", (const uint8_t *) info->token,
info->tokenLength);
OIC_LOG_V(DEBUG, ANALYZER_TAG, "Res URI = [%s]", info->resourceUri);
OIC_TRACE_MARK(%s:CALogPDUInfo:uri:%s, TAG, info->resourceUri);
if (CA_FORMAT_APPLICATION_CBOR == info->payloadFormat)
{
......@@ -1471,6 +1471,7 @@ static void CALogPDUInfo(const CAData_t *data, const coap_pdu_t *pdu)
// OIC_LOG_BUFFER(DEBUG, ANALYZER_TAG, pdu->data, payloadLen);
OIC_LOG_V(DEBUG, ANALYZER_TAG, "CoAP Payload Size = [%lu]", payloadLen);
OIC_LOG(DEBUG, ANALYZER_TAG, "=================================================");
OIC_TRACE_END();
}
#else
static void CALogPDUInfo(const CAData_t *data, const coap_pdu_t *pdu)
......
......@@ -259,7 +259,7 @@ coap_pdu_t *CAGeneratePDUImpl(code_t code, const CAInfo_t *info,
VERIFY_NON_NULL_RET(info, TAG, "info", NULL);
VERIFY_NON_NULL_RET(endpoint, TAG, "endpoint", NULL);
VERIFY_NON_NULL_RET(transport, TAG, "transport", NULL);
VERIFY_TRUE_RET((info->payloadSize <= COAP_MAX_PDU_SIZE), TAG,
VERIFY_TRUE_RET((info->payloadSize <= UINT_MAX), TAG,
"info->payloadSize", NULL);
size_t length = COAP_MAX_PDU_SIZE;
......
......@@ -38,8 +38,6 @@
#define TAG "IPC"
#define UINT16_MAX 65535
static int g_sockID = 0;
/**
......
......@@ -64,6 +64,8 @@ if catest_env.get('SECURED') == '1':
catest_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509','mbedcrypto'])
if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
if 'CLIENT' in rd_mode and target_os not in ['arduino', 'darwin', 'ios', 'windows', 'winrt']:
catest_env.PrependUnique(LIBS = ['oc', 'oc_logger'])
catest_env.PrependUnique(LIBS = ['resource_directory'])
if target_os not in ['msys_nt', 'windows']:
......
File mode changed from 100755 to 100644
Import('env')
import os
log_level = env.get('LOG_LEVEL')