char *str = OICStrdup(from);
char *ptr = strtok(str, ";");
+ if(ptr == NULL)
+ return false;
+
do
{
if(strstr(ptr, ".if."))
void updateWiFiResource(OCEntityHandlerRequest* ehRequest, OCRepPayload* input)
{
- if(ehRequest && !CompareResourceInterface(ehRequest->query, OC_RSRVD_INTERFACE_DEFAULT))
+ if(ehRequest &&
+ strcmp(ehRequest->query, "") &&
+ !CompareResourceInterface(ehRequest->query, OC_RSRVD_INTERFACE_DEFAULT))
{
// In case of link list, batch interface
OIC_LOG(ERROR, ES_RH_TAG, "Not supported Interface");
void updateCloudResource(OCEntityHandlerRequest* ehRequest, OCRepPayload* input)
{
- if(ehRequest && !CompareResourceInterface(ehRequest->query, OC_RSRVD_INTERFACE_DEFAULT))
+ if(ehRequest &&
+ strcmp(ehRequest->query, "") &&
+ !CompareResourceInterface(ehRequest->query, OC_RSRVD_INTERFACE_DEFAULT))
{
// In case of link list, batch interface
OIC_LOG(ERROR, ES_RH_TAG, "Not supported Interface");
void updateDevConfResource(OCEntityHandlerRequest* ehRequest, OCRepPayload* input)
{
- if(ehRequest && !CompareResourceInterface(ehRequest->query, OC_RSRVD_INTERFACE_DEFAULT))
+ if(ehRequest &&
+ strcmp(ehRequest->query, "") &&
+ !CompareResourceInterface(ehRequest->query, OC_RSRVD_INTERFACE_DEFAULT))
{
// In case of link list, batch interface
OIC_LOG(ERROR, ES_RH_TAG, "Not supported Interface");
OCRepPayload* constructResponseOfWiFi(OCEntityHandlerRequest *ehRequest)
{
- if(ehRequest && !CompareResourceInterface(ehRequest->query, OC_RSRVD_INTERFACE_DEFAULT))
+ if(ehRequest &&
+ strcmp(ehRequest->query, "") &&
+ !CompareResourceInterface(ehRequest->query, OC_RSRVD_INTERFACE_DEFAULT))
{
// In case of link list, batch interface
OIC_LOG(ERROR, ES_RH_TAG, "Not supported Interface");
}
OIC_LOG(INFO, ES_RH_TAG, "constructResponse wifi res");
- OCRepPayloadSetUri(payload, OC_RSRVD_ES_URI_WIFI);
+ OCRepPayloadSetPropString(payload, OC_RSRVD_ES_HREF, OC_RSRVD_ES_URI_WIFI);
size_t dimensions[MAX_REP_ARRAY_DEPTH] = {gWiFiResource.numMode, 0, 0};
int64_t *modes_64 = (int64_t *)OICMalloc(gWiFiResource.numMode * sizeof(int64_t));
OCRepPayload* constructResponseOfCloud(OCEntityHandlerRequest *ehRequest)
{
- if(ehRequest && !CompareResourceInterface(ehRequest->query, OC_RSRVD_INTERFACE_DEFAULT))
+ if(ehRequest &&
+ strcmp(ehRequest->query, "") &&
+ !CompareResourceInterface(ehRequest->query, OC_RSRVD_INTERFACE_DEFAULT))
{
// In case of link list, batch interface
OIC_LOG(ERROR, ES_RH_TAG, "Not supported Interface");
}
OIC_LOG(INFO, ES_RH_TAG, "constructResponse prov res");
- OCRepPayloadSetUri(payload, OC_RSRVD_ES_URI_CLOUDSERVER);
+ OCRepPayloadSetPropString(payload, OC_RSRVD_ES_HREF, OC_RSRVD_ES_URI_CLOUDSERVER);
OCRepPayloadSetPropString(payload, OC_RSRVD_ES_AUTHCODE, gCloudResource.authCode);
OCRepPayloadSetPropString(payload, OC_RSRVD_ES_AUTHPROVIDER, gCloudResource.authProvider);
OCRepPayloadSetPropString(payload, OC_RSRVD_ES_CISERVER, gCloudResource.ciServer);
OCRepPayload* constructResponseOfDevConf(OCEntityHandlerRequest *ehRequest)
{
- if(ehRequest && !CompareResourceInterface(ehRequest->query, OC_RSRVD_INTERFACE_DEFAULT))
+ if(ehRequest &&
+ strcmp(ehRequest->query, "") &&
+ !CompareResourceInterface(ehRequest->query, OC_RSRVD_INTERFACE_DEFAULT))
{
// In case of link list, batch interface
OIC_LOG(ERROR, ES_RH_TAG, "Not supported Interface");
}
OIC_LOG(INFO, ES_RH_TAG, "constructResponse prov res");
- OCRepPayloadSetUri(payload, OC_RSRVD_ES_URI_DEVCONF);
+ OCRepPayloadSetPropString(payload, OC_RSRVD_ES_HREF, OC_RSRVD_ES_URI_DEVCONF);
OCRepPayloadSetPropString(payload, OC_RSRVD_ES_DEVNAME, gDevConfResource.devName);
OCRepPayloadSetPropString(payload, OC_RSRVD_ES_MODELNUMBER, gDevConfResource.modelNumber);
OCRepPayloadSetPropString(payload, OC_RSRVD_ES_LOCATION, gDevConfResource.location);
(ehRequest->query && CompareResourceInterface(ehRequest->query, OC_RSRVD_INTERFACE_DEFAULT)))
{
OIC_LOG(INFO, ES_RH_TAG, "constructResponse prov res");
- OCRepPayloadSetUri(payload, OC_RSRVD_ES_URI_PROV);
+ OCRepPayloadSetPropString(payload, OC_RSRVD_ES_HREF, OC_RSRVD_ES_URI_PROV);
OCRepPayloadSetPropInt(payload, OC_RSRVD_ES_PROVSTATUS, gProvResource.status);
OCRepPayloadSetPropInt(payload, OC_RSRVD_ES_LAST_ERRORCODE, gProvResource.lastErrCode);
OCRepPayloadSetPropString(payload, OC_RSRVD_ES_LINKS, gProvResource.ocfWebLinks);
echo `pwd`
+# Clean tmp directory.
rm -rf ./tmp
# Create directory structure for GBS Build
rm -rf $sourcedir/tmp/extlibs/tinycbor/tinycbor/.git
cp -R ./extlibs/cjson $sourcedir/tmp/extlibs
+cp -R ./extlibs/mbedtls $sourcedir/tmp/extlibs
cp -R ./extlibs/gtest $sourcedir/tmp/extlibs
cp -R ./extlibs/tinydtls $sourcedir/tmp/extlibs
-cp -R ./extlibs/sqlite3 $sourcedir/tmp/extlibs
+cp -LR ./extlibs/sqlite3 $sourcedir/tmp/extlibs
cp -R ./extlibs/timer $sourcedir/tmp/extlibs
cp -R ./extlibs/rapidxml $sourcedir/tmp/extlibs
cp -R ./resource $sourcedir/tmp
cp ./tools/tizen/.gbs.conf ./tmp
cp ./tools/tizen/*.rpm $sourcedir/tmp/service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample
cp ./tools/tizen/.gbs.conf ./tmp/service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample
+
cp -R $sourcedir/iotivity.pc.in $sourcedir/tmp
cd $sourcedir/tmp
echo `pwd`
+if [ -d ./extlibs/mbedtls/mbedtls ];then
+ cd ./extlibs/mbedtls/mbedtls
+ git reset --hard ad249f509fd62a3bbea7ccd1fef605dbd482a7bd ; git apply ../ocf.patch
+ cd -
+ rm -rf ./extlibs/mbedtls/mbedtls/.git*
+
+else
+ echo ""
+ echo "*********************************** Error: ****************************************"
+ echo "* Please download mbedtls using the following command: *"
+ echo "* $ git clone https://github.com/ARMmbed/mbedtls.git extlibs/mbedtls/mbedtls *"
+ echo "***********************************************************************************"
+ echo ""
+ exit
+fi
rm -rf ./extlibs/tinycbor/tinycbor/.git*
-whoami
# Build IoTivity
# Initialize Git repository
git commit -m "Initial commit"
fi
-buildoption="--define 'TARGET_TRANSPORT '$1 --define 'SECURED '$2 --define 'ROUTING '$3 --define 'RELEASE '$4 --define 'LOGGING '$5 --define 'ES_TARGET_ENROLLEE '$6"
+buildoption="--define 'TARGET_TRANSPORT '$1 --define 'SECURED '$2 --define 'ROUTING '$3 --define 'RELEASE '$4 --define 'LOGGING '$5 --define 'ES_TARGET_ENROLLEE '$6 --define 'WITH_TCP '$7 --define 'WITH_CLOUD '$8"
echo "Calling core gbs build command"
gbscommand="gbs build -A armv7l -B ~/GBS-ROOT-OIC $buildoption --include-all --repository ./"
echo $gbscommand