platform/upstream/iotivity.git
8 years agoMerge branch 'master' into resource-manipulation
hunje.yeon [Sun, 12 Jul 2015 03:35:30 +0000 (12:35 +0900)]
Merge branch 'master' into resource-manipulation

Apply the resece updates from 'master' branch into 'resource-manipulation' branch
This update includes the fix of current 'presence' issues.

Change-Id: I4417164bd31285e80d9dd4b655e6f828ee1b6fe0
Signed-off-by: hunje.yeon <hunje.yeon@samsung.com>
8 years agoFixed broken presence after IPv6 plumbing merge to master.
Erich Keane [Sat, 11 Jul 2015 05:37:41 +0000 (22:37 -0700)]
Fixed broken presence after IPv6 plumbing merge to 

Presence wasn't working for multiple reasons. oc/presence was not moved
to oic/ad, probably lost in the merge to master.
resourceUri in CA data structures was moved form the endpoint to the
CAInfo struct. But wasn't included in a clone operation which resulted
in a race condition when the memory was free'd in the main thread before
being accessed by the thread in CA.
Other adapter/flag issues.
Unicast presence failed to work because host() from OCResource only
returned the IP without the port.

Change-Id: If2e46f4677ebe369cbaee9609de38c369bf4c524
Signed-off-by: Mandeep Shetty <mandeep.shetty@intel.com>
Signed-off-by: Erich Keane <erich.keane@verizon.net>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1424
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
8 years agoChanged C Samples to use correct adapter type
Omkar Hegde [Fri, 10 Jul 2015 23:21:17 +0000 (16:21 -0700)]
Changed C Samples to use correct adapter type

The  C Samples were broken as a result of changing
the samples for IPv6. Also, removed port 6298 from
unicast discovery query and replaced some printf()
with OC_LOG(). Removed Differentiation between
IPv4 and IPv6 in the samples.

Change-Id: I83859aaf468c991ca5406014359476d0f43d5745
Signed-off-by: Omkar Hegde <omkar.m.hegde@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1623
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
8 years agoFixed an invalid read/write caused by deleted temporary
Erich Keane [Fri, 10 Jul 2015 22:42:07 +0000 (15:42 -0700)]
Fixed an invalid read/write caused by deleted temporary

The copy used a std::copy mechanism on optionData, which
resulted in the temporary being deleted before the function
returned.  This creates a variable to hold the temporary so that
the string won't be deleted before use.

Change-Id: I5da2601b730e27d42e244b52ba6cdd69a0e28fb4
Signed-off-by: Erich Keane <erich.keane@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1622
Reviewed-by: Mandeep Shetty <mandeep.shetty@intel.com>
Reviewed-by: Omkar Hegde <omkar.m.hegde@intel.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
8 years agoUpdated Secure Sample for new resource discovery response
Sachin Agrawal [Fri, 10 Jul 2015 00:27:59 +0000 (17:27 -0700)]
Updated Secure Sample for new resource discovery response

Resource Discovery response was udpated to be compliance with
OIC Specification. This change is to correctly parse the
discovery response.

Change-Id: I3c16f0ed827f5f993def01e7741c592b1ad1926b
Signed-off-by: Sachin Agrawal <sachin.agrawal@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1614
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Mandeep Shetty <mandeep.shetty@intel.com>
Reviewed-by: Sakthivel Samidurai <sakthivel.samidurai@intel.com>
8 years agoAdd Destructor to free new allocated resource in Ctor.
Jamal Haidar [Sat, 4 Jul 2015 11:59:23 +0000 (17:29 +0530)]
Add Destructor to free new allocated resource in Ctor.

~Middle() and ~RestInput() destrcutors added which deletes allocated
memory in Ctors.

Change-Id: I29823cde6c7b28325fde9b40f088f83994ebc6a5
Signed-off-by: Jamal Haidar <jamal.haidar@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1522
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
8 years agocsdk: Fixes cppcheck issue in security dir.
Ravi Nanjundappa [Wed, 1 Jul 2015 13:41:29 +0000 (19:11 +0530)]
csdk: Fixes cppcheck issue in security dir.

This patch fixes the the below issue reported by cppcheck tool in security dir:
"(error) Possible null pointer dereference: jsonObj - otherwise it is
 redundant to check if jsonObj is null at line 259
(error) Possible null pointer dereference: jsonStr1 - otherwise it is
redundant to check if jsonStr1 is null at line 132"

Null value check of jsonObj and jsonStr1 are removed as it in unnecessary here.

Change-Id: I6c0676a58780afea3026c3e1332c8ecac7c0dd1e
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1508
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Sachin Agrawal <sachin.agrawal@intel.com>
Reviewed-by: Erich Keane <erich.keane@intel.com>
8 years ago[CA] RI sample occlient fix for not able to send get unicast data
koushik.girijala [Fri, 3 Jul 2015 07:18:02 +0000 (12:48 +0530)]
[CA] RI sample occlient fix for not able to send get unicast data

fixed OCconectivity type and port number adding to uri

Change-Id: Ie99e66dd6c7840008d9f0cfc41089d183907c585
Signed-off-by: koushik.girijala <g.koushik@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1503
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Abhishek Pandey <abhi.siso@samsung.com>
Reviewed-by: Erich Keane <erich.keane@intel.com>
8 years agoUpdated android BLE code
jihwan.seo [Mon, 6 Jul 2015 08:48:28 +0000 (17:48 +0900)]
Updated android BLE code

I have replaced previous property and permission code
with Property_Notify which mentioned OIC ble spec.
(https://workspace.openinterconnect.org/
 apps/org/workgroup/oswg/download.php/1568/
 OIC_BLE_Transport_Profile.pdf)

Change-Id: I7002ba70c9f0d267ef9f695c0cb3ee3688dd9a77
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1532
Reviewed-by: Abhishek Sharma <ce.abhishek@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
8 years agoUpdated the comments as per Jira IOT-573
sanilgupta [Wed, 1 Jul 2015 06:41:05 +0000 (12:11 +0530)]
Updated the comments as per Jira IOT-573

Please update

Change-Id: Idd318b1f6d2359deb1653b323d35159ffb9fbd8f
Signed-off-by: sanilgupta <sanil.g@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1473
Reviewed-by: Ravi Nanjundappa <nravi.n@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
8 years agoReplaced printf with Serial.println() in arduino CASample
vimala.v [Thu, 9 Jul 2015 11:54:41 +0000 (17:24 +0530)]
Replaced printf with Serial.println() in arduino CASample

Change-Id: I8ab085b2ca330789255d8397d42cf483a9d97187
Signed-off-by: vimala.v <vimala.v@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1600
Reviewed-by: Abhishek Pandey <abhi.siso@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
8 years agoFix Android TinyDtls build issue in Debug mode
jnashok [Fri, 10 Jul 2015 08:10:18 +0000 (17:10 +0900)]
Fix Android TinyDtls build issue in Debug mode

For Android build currently debug.c is not included.
In this case NDEBUG flag must be defined.
Provided a correct fix

Change-Id: Icaa4364a3e87bc33e9e7165977838ba1ea328506
Signed-off-by: jnashok <jn.ashok@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1618
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Abhishek Pandey <abhi.siso@samsung.com>
Reviewed-by: Erich Keane <erich.keane@intel.com>
8 years agoResolved compilation issues of BLE adapter in Tizen and Arduino
vimala.v [Thu, 9 Jul 2015 08:39:46 +0000 (14:09 +0530)]
Resolved compilation issues of BLE adapter in Tizen and Arduino

Change-Id: If9c4d1ade926733a3959808e9b3cfc6880e91cb3
Signed-off-by: vimala.v <vimala.v@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1594
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
8 years agoMerge branch 'master' into resource-manipulation
hunje.yeon [Fri, 10 Jul 2015 04:40:19 +0000 (13:40 +0900)]
Merge branch 'master' into resource-manipulation

Update the recent changes of 'master' branch into 'resource-manipulation' branch

Change-Id: I24c60962d6e6c6d2b80af0333bd5f011b5083f27
Signed-off-by: hunje.yeon <hunje.yeon@samsung.com>
8 years agoUpdated gitignore to ignore dependencies folder
Sachin Agrawal [Fri, 10 Jul 2015 00:39:06 +0000 (17:39 -0700)]
Updated gitignore to ignore dependencies folder

Ignore 'dep' folder created in iotivity tree when
android build is invoked.

Change-Id: Ibd9630a9d4327c44518d632fb8f39ffd3509b9f3
Signed-off-by: Sachin Agrawal <sachin.agrawal@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1615
Reviewed-by: Erich Keane <erich.keane@intel.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
8 years agoResource Client updated
Jay Sharma [Thu, 9 Jul 2015 14:31:26 +0000 (20:01 +0530)]
Resource Client updated

- Updated Doxygen comments
- Updated ResourceClient APIs
- Updated Exception handling in Resource Client

Change-Id: Ie299c18d47732c21588dbba8678bb3d3e4b905ac
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1605
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
8 years agoSample Client and Server Application
Jay Sharma [Thu, 9 Jul 2015 15:54:13 +0000 (21:24 +0530)]
Sample Client and Server Application

- Sample client using the Resource Client APIs (Resource Broker & Resource Cache)
- Sample Server using Server Builder APIs

Change-Id: Ibdafb01f8a9c40c52d9a9175c5e5ddd4c5a43eb6
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1607
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
8 years agoadd new test cases for resource container
Minji Park [Thu, 9 Jul 2015 13:54:00 +0000 (22:54 +0900)]
add new test cases for resource container

Change-Id: Ie5c917b14c24782b2ec0b08cf9f820bfbbac371b
Signed-off-by: Minji Park <minjii.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1604
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
8 years agoFix failure to respond when SRM says Access Denied.
Mandeep Shetty [Thu, 9 Jul 2015 17:15:11 +0000 (10:15 -0700)]
Fix failure to respond when SRM says Access Denied.

The enum types for forbidden request and unauthorized request in
CAResponseResult_t added as part of security where misisng in a sanity
check switch case. This caused the forbidden and unauthorized response
codes to be classified as invalid.

Change-Id: Idc53a50422e3d5e43a847395a2389da351ea6baf
Signed-off-by: Mandeep Shetty <mandeep.shetty@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1610
Reviewed-by: Erich Keane <erich.keane@intel.com>
Reviewed-by: Sachin Agrawal <sachin.agrawal@intel.com>
Tested-by: Sachin Agrawal <sachin.agrawal@intel.com>
8 years agoUpdated android code based on OcConnectivityType changes due to IPv6 support
Rahul Rahul [Thu, 2 Jul 2015 19:23:14 +0000 (12:23 -0700)]
Updated android code based on OcConnectivityType changes due to IPv6 support

Change-Id: Ic3c332dc72c5ab87f971b346eae0cb5456ac58a7
Signed-off-by: Rahul Rahul <rahul.rahul@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1495
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Bernie Keany <bernie.keany@intel.com>
Reviewed-by: Erich Keane <erich.keane@intel.com>
8 years agoAdding GuiClient example for android
Rahul Rahul [Mon, 6 Jul 2015 22:59:04 +0000 (15:59 -0700)]
Adding GuiClient example for android

Change-Id: I4c0930032ccfc7814965f152846d16561bd3ed76
Signed-off-by: Rahul Rahul <rahul.rahul@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1543
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
8 years agoFixed Tizen CASample to select proper Transport type.
vimala.v [Thu, 9 Jul 2015 10:37:22 +0000 (16:07 +0530)]
Fixed Tizen CASample to select proper Transport type.

Change-Id: I74c8cc3a768501c8620b9f558a1e15da04d79e08
Signed-off-by: vimala.v <vimala.v@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1596
Reviewed-by: Abhishek Sharma <ce.abhishek@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
8 years ago[Tizen][DTLS] Fix for broken DTLS build in Tizen
Abhishek Sharma [Thu, 9 Jul 2015 11:05:26 +0000 (16:35 +0530)]
[Tizen][DTLS] Fix for broken DTLS build in Tizen

Fixed broken DTLS build in Tizen

Change-Id: If281be0640fd11a830655102bc9cd091a82a0df8
Signed-off-by: Abhishek Sharma <ce.abhishek@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1599
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
8 years agomodify the preprocessor to stop the thread in ipadapter
hyuna0213.jo [Thu, 9 Jul 2015 05:19:58 +0000 (14:19 +0900)]
modify the preprocessor to stop the thread in ipadapter

In case I use a ndk-build for android sample build,
the MULTI_THREAD is not defined.
because preprocessor was defined within Sconscript.
so I modified the code to stop the send thread.

Change-Id: I732fad2120fe243b6b976230aa395fdbb385dda1
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1588
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Naga Ashok Jampani <jn.ashok@samsung.com>
Reviewed-by: Erich Keane <erich.keane@intel.com>
8 years ago[Tizen][BLE] Fix for broken BLE build
Abhishek Sharma [Thu, 9 Jul 2015 12:09:08 +0000 (17:39 +0530)]
[Tizen][BLE] Fix for broken BLE build

Fixed broken BLE build for Tizen

Change-Id: I508404f97ef5ef19f1b9820519e44c1d911158da
Signed-off-by: Abhishek Sharma <ce.abhishek@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1601
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
8 years agoFix memory leak in policyengine
Jamal Haidar [Thu, 9 Jul 2015 07:56:49 +0000 (13:26 +0530)]
Fix memory leak in policyengine

Temp allocated memory in policyengine is unsed and not freed before
exit.

Change-Id: I1a1f3587c521b83ba764248f00547a2e8997c865
Signed-off-by: Jamal Haidar <jamal.haidar@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1592
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Sachin Agrawal <sachin.agrawal@intel.com>
Tested-by: Sachin Agrawal <sachin.agrawal@intel.com>
8 years agoUpdate Resource Container
Minji Park [Thu, 9 Jul 2015 11:02:06 +0000 (20:02 +0900)]
Update Resource Container

- modify Bundle Resource and samples
- update container for checking config file loaded and listresources

Change-Id: Ib37cfcfd1f4f24ce9573d744abaed057e0b813ae
Signed-off-by: Minji Park <minjii.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1595
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
8 years agothings-manager: sampleapp: fix name of musicplayer
Hauke Mehrtens [Mon, 29 Jun 2015 21:07:39 +0000 (23:07 +0200)]
things-manager: sampleapp: fix name of musicplayer

The musicplayer should be named MusicplayerApp as it is referenced
under that name some lines below.

Change-Id: I351ee4316bbb19a67a0afc16882cb2192a2ff07f
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1445
Reviewed-by: Erich Keane <erich.keane@intel.com>
Reviewed-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
8 years agoAdd destroy function into primitive service timer
ChaJiwon [Thu, 9 Jul 2015 08:08:15 +0000 (17:08 +0900)]
Add destroy function into primitive service timer

When ExpiryTimer's destructor called, ExpiryTimer requests destroy to ExpiryTimer_impl.
ExpiryTimer_impl makes a decision for destroying instance or not.

Change-Id: Ib93dec7ff76ef96923bf34f5e645a8d0c2b5dfdc
Signed-off-by: ChaJiwon <jw_wonny.cha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1593
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
8 years agoJavadoc for Java Bundle-API, Modified public access API
Markus Jung [Wed, 8 Jul 2015 13:26:56 +0000 (22:26 +0900)]
Javadoc for Java Bundle-API, Modified public access API

Change-Id: Ie1e50a3f3edb5f59ee331fabfcf8aee160d692f8
Signed-off-by: Markus Jung <markus.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1589
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
8 years agoChanged discovery JSON for spec compliance to contain device ID.
Mandeep Shetty [Tue, 7 Jul 2015 22:35:12 +0000 (15:35 -0700)]
Changed discovery JSON for spec compliance to contain device ID.

New json schema does not have properties field for resources.
Everything is now a property.
Device ID as string UUID is included in discovery responses once per
response as opposed to being a part of every resource earlier.

Device Ids as part of every resource rep is also accepted and will be
used in resource construction if present.
Refactored filtering and encoding for resource into separate functions.
Removed unnecessary repeated strcmp() to figure out type of virtual
uri.

Change-Id: Ib995e819c8ab63aae6abff956941698d6919f9c4
Signed-off-by: Mandeep Shetty <mandeep.shetty@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/934
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Sakthivel Samidurai <sakthivel.samidurai@intel.com>
Reviewed-by: Erich Keane <erich.keane@intel.com>
9 years agoAdd comments on bundle API headers for doxygen
Minji Park [Wed, 8 Jul 2015 07:59:27 +0000 (16:59 +0900)]
Add comments on bundle API headers for doxygen

Change-Id: I1bc859e37631a28fac7ce92d87b38c730c8457e6
Signed-off-by: Minji Park <minjii.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1579
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
9 years agoResource container build check for external libraries
Markus Jung [Wed, 8 Jul 2015 06:56:37 +0000 (15:56 +0900)]
Resource container build check for external libraries

There is now a check for libcurl and the Java environment.
If the external libraries are not available, instructions how to
install are provided.

Change-Id: Iee24b49f86ca64887cc84687d78998917177ce0a
Signed-off-by: Markus Jung <markus.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1576
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoFix string copy issue in Credential resource unit test.
Ankur Bansal [Tue, 7 Jul 2015 07:26:56 +0000 (12:56 +0530)]
Fix string copy issue in Credential resource unit test.

Update getCredList to correctly pass length of destination buffer while
using OICStrcpy.

Change-Id: I4763d295fc1da92831956bf9ed4a34e90718c7f3
Signed-off-by: Ankur Bansal <ankur.b1@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1553
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Sachin Agrawal <sachin.agrawal@intel.com>
9 years agoIntegrated single/multi thread for interface controller and connectivity manager.
jw1103.kim [Mon, 20 Apr 2015 12:17:44 +0000 (21:17 +0900)]
Integrated single/multi thread for interface controller and connectivity manager.

Merged serperated files by using #SINGLE_THREAD and #MULTI_THREAD flags.

Signed-off-by: jw1103.kim <jw1103.kim@samsung.com>
Signed-off-by: Ashok Channa <ashok.channa@samsung.com>
Change-Id: I2d7b38d86226bdfc03c7a7b12626c2c4459ad305
Signed-off-by: jw1103.kim <jw1103.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/783
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
9 years agoModify exception class and include guards of broker.
jyong2.kim [Wed, 8 Jul 2015 05:09:59 +0000 (14:09 +0900)]
Modify exception class and include guards of broker.

add exception for subscribe presence.
fix bug about Initialize of DevicePresence.

Change-Id: I4588e213e7b8a56e06a280225d00ce4583909a37
Signed-off-by: jyong2.kim <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1572
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoChange thread model to std::thread
ChaJiwon [Wed, 8 Jul 2015 06:25:28 +0000 (15:25 +0900)]
Change thread model to std::thread

Use condition variable to check expired time.
Add lock_guard to insert & cancel timerCBList.
Change Singleton instance pointer from shared pointer to pointer.

Change-Id: I0fc13809777691396140910eac6648b0ea5cfe57
Signed-off-by: ChaJiwon <jw_wonny.cha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1570
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoupdate Resource Container
Minji Park [Wed, 8 Jul 2015 05:58:37 +0000 (14:58 +0900)]
update Resource Container

- update listBundleResources api
- modify unregisterResource in the container and sample bundles
- rearrange the order of methods in resourcecontainerImpl source code

Change-Id: Id7e0d401b96bafd6c781950258c10789cba40319
Signed-off-by: Minji Park <minjii.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1573
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoModify resourceCacheManager
YounghyunJoo [Wed, 8 Jul 2015 06:03:28 +0000 (15:03 +0900)]
Modify resourceCacheManager

add function that erases the cache subscriber on the cache subscriber list when cancelResourceCache() is called
modify "InvalidParameter" name to "InvalidParmeterExecption"

Change-Id: Ide08a397036bbe1daf2922e1cff9f59a968dbe8c
Signed-off-by: YounghyunJoo <yh_.joo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1574
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agothings-manager: Fix cppcheck issues in TMSampleApp for tizen
Ravi Nanjundappa [Fri, 3 Jul 2015 11:11:27 +0000 (16:41 +0530)]
things-manager: Fix cppcheck issues in TMSampleApp for tizen

This patch fixes the below issues
reported by cppcheck tool in TMSampleApp dir for tizen.
"(error) Possible null pointer dereference: popup_fields ...."

It is invliad to set the member of popup_field to NULL if
popup_field itself is NULL.
Removed such statements from the code.

Change-Id: Ie1457662cb2727e5bab5e21886db6bece2f356a7
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1511
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Harish Marappa <h.marappa@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoBundle deactivation
Markus Jung [Tue, 7 Jul 2015 11:04:39 +0000 (20:04 +0900)]
Bundle deactivation

Implemented bundle deactivation which includes the removal of registered resources.
Modified ContainerTest to load, start and stop different bundles and test the
bundle activation/deactviation.

Change-Id: I5149851278aa457bee5f86c039f8f3a8320b8652
Signed-off-by: Markus Jung <markus.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1568
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoAdd type class for ResourceAttriutes
coderhyme [Wed, 8 Jul 2015 04:00:50 +0000 (13:00 +0900)]
Add type class for ResourceAttriutes

The class helps distinguish types between Values

Change-Id: I7a02c290bb6b1f3fb7d26ef7cb1087268afa36ac
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1569
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
9 years agoadding functions in Server Builder
Rami Jung [Tue, 7 Jul 2015 13:53:26 +0000 (22:53 +0900)]
adding functions in Server Builder
  setAttributeUpdatedHandler
  removeAddAttributeUpdatedHandler

Change-Id: I13bb7578b6bd92823c96d56866ae456030bacb3a
Signed-off-by: Rami Jung <rami.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1562
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Hun-je Yeon <hunje.yeon@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agosoft-sensor-manager: Fixes cppcheck issue for arduino SampleApp
Ravi Nanjundappa [Fri, 3 Jul 2015 11:06:22 +0000 (16:36 +0530)]
soft-sensor-manager: Fixes cppcheck issue for arduino SampleApp

This patch fixes the the below issue reported by cppcheck tool
in stack dir: "(error) Possible null pointer dereference:
entityHandlerRequest - otherwise it is redundant to check if
entityHandlerRequest is null at line 114"

Dereferencing of entityHandlerRequest->resJSONPayload is done if
flag includes OC_REQUEST_FLAG.

The patch also includes removal of some unnecessary blank lines

Change-Id: I8d9d7c40df5602b9d55de8d948871a2c485798a2
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1510
Reviewed-by: Erich Keane <erich.keane@intel.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Minji Park <minjii.park@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoArrange Cache module code and logic.
jyong2.kim [Tue, 7 Jul 2015 10:49:30 +0000 (19:49 +0900)]
Arrange Cache module code and logic.

add namespace OIC::Service.
change parameter and return type of interfaces.
add exception handle in interfaces.
arrange duplicated code and logic.
add updateResourceCache().

Change-Id: I71302bc7cc0351626dd67790e2b4bf787c5b881e
Signed-off-by: jyong2.kim <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1558
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoresource container unit tests, updates for container
Minji Park [Tue, 7 Jul 2015 05:41:35 +0000 (14:41 +0900)]
resource container unit tests, updates for container

- unit tests for resource container
- update SConscript
- update bundleinfo and configuration in container

Change-Id: I0c92b15cb1229e5f16a7a7db18aab3cc32778bcc
Signed-off-by: Minji Park <minjii.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1555
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoUsing build() as name to create a new instance of BundleInfo
Markus Jung [Tue, 7 Jul 2015 09:58:33 +0000 (18:58 +0900)]
Using build() as name to create a new instance of BundleInfo

Change-Id: Ib3408ff18a3fe872feffad4acc214feaa2a4926a
Signed-off-by: Markus Jung <markus.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1556
Reviewed-by: Hun-je Yeon <hunje.yeon@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoFix build fail of broker module.
jyong2.kim [Tue, 7 Jul 2015 11:00:40 +0000 (20:00 +0900)]
Fix build fail of broker module.

fix syntax error.
add expiryTimer's script in common sconscript.

Change-Id: I396c2249cc68568e81885f1e05a40cccf7f68662
Signed-off-by: jyong2.kim <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1560
Reviewed-by: Hun-je Yeon <hunje.yeon@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: kwon doil <doil.kwon@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agointegrated caretransmission single/multi thread
hyuna0213.jo [Mon, 11 May 2015 04:50:55 +0000 (13:50 +0900)]
integrated caretransmission single/multi thread

Merged serperated files by using #SINGLE_THREAD flags

Change-Id: I8c0162b6220a221146ffa1428f25612aa0cfc0c4
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/950
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
9 years agofixed Android Sample App build issue
jihwan.seo [Tue, 7 Jul 2015 12:16:05 +0000 (21:16 +0900)]
fixed Android Sample App build issue

to import Log was missed
so it was not built

Change-Id: I702b220bddd9ba0243a47eeca718326eb17fa9f6
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1561
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
9 years agoFix defects of IOT-534 in Things Manager
Jihun Ha [Tue, 7 Jul 2015 00:40:56 +0000 (09:40 +0900)]
Fix defects of IOT-534 in Things Manager

Exception handling logic is added in group application.
startPresence for enabling presence check is added in speaker and musicplayer apps.

Change-Id: I12f6589154e27d288417d3fdd6413b867499a2bf
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1547
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoAdd handling for error case in GroupManager::getActionSetfromString.
Ankur Bansal [Sat, 4 Jul 2015 13:08:08 +0000 (18:38 +0530)]
Add handling for error case in GroupManager::getActionSetfromString.

Delete action in case something went wrong during parsing.

Change-Id: I0e72db223ef21d0e89351d238532e168b2ca1177
Signed-off-by: Ankur Bansal <ankur.b1@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1523
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoFix a potential crash in PPM, in case of incomlete xml.
Ankur Bansal [Mon, 6 Jul 2015 12:07:32 +0000 (17:37 +0530)]
Fix a potential crash in PPM, in case of incomlete xml.

Handle the case when pluginInfo tag is missing in the Configuration
file.

Change-Id: I0bc8e14a875a71bd2254d5ef917b3dc7652339f8
Signed-off-by: Ankur Bansal <ankur.b1@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1538
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Younghyun Joo <yh_.joo@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoFix wrong unittests in RequestHandlerTest
coderhyme [Tue, 7 Jul 2015 02:21:47 +0000 (11:21 +0900)]
Fix wrong unittests in RequestHandlerTest

The tests regarding AcceptanceMethod

Change-Id: Iaa18464b9059887c4ab229e8a5f2ca44bdad221f
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1549
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoReplace setAttribute with non-template methods.
coderhyme [Sat, 4 Jul 2015 07:51:07 +0000 (16:51 +0900)]
Replace setAttribute with non-template methods.

To extract a common interface that manipulates attributes.
And add invokeOCFunc that takes multiple OCStackResult values considered as success.

Change-Id: I39fa49525e95739b7fdbbc06384782453e156f65
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1548
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoModify header file name in the Resource Cache codes
YounghyunJoo [Mon, 6 Jul 2015 05:59:05 +0000 (14:59 +0900)]
Modify header file name in the Resource Cache codes

rename PrimitiveTimer to ExpiryTimer

Change-Id: Ie1dda93d0857537b4b704b38a2c2bf51d7a3196c
Signed-off-by: YounghyunJoo <yh_.joo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1528
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Reviewed-by: Hun-je Yeon <hunje.yeon@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoApplied to "expiryTimer" for "ResourceBroker"
doil.kwon [Fri, 3 Jul 2015 08:21:23 +0000 (17:21 +0900)]
Applied to "expiryTimer" for "ResourceBroker"

- Header's name is changed(primitiveTimer->expiryTimer)

- Added contents about expiryTimer in SConscript

- Modified variable's name about ExpiryTimer class

- Changed "relative path" to "absolute path" about included path

Change-Id: I4f5b3c125a7450f332d333f761c4010048ff7838
Signed-off-by: doil.kwon <doil.kwon@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1505
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: JungYong KIM <jyong2.kim@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoUsing relative links in configuration files. Implemented listBundles to retrieve...
Markus Jung [Mon, 6 Jul 2015 06:46:53 +0000 (15:46 +0900)]
Using relative links in configuration files. Implemented listBundles to retrieve the current bundles available in the resource container.

Change-Id: Ia5d2f2b7e16cb2eb5f37bd866f33d437c03eb033
Signed-off-by: Markus Jung <markus.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1530
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoApplied IoTivity code style template on all Java source files
Markus Jung [Mon, 6 Jul 2015 06:01:47 +0000 (15:01 +0900)]
Applied IoTivity code style template on all Java source files

Change-Id: I8a72cc1d99e8705add20124f506013cb900110f2
Signed-off-by: Markus Jung <markus.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1529
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoFix delete array memory issue
Jamal Haidar [Fri, 26 Jun 2015 13:14:23 +0000 (18:44 +0530)]
Fix delete array memory issue

Memory assigned with new array is deleted with non-array delete

Change-Id: I7e3411104d805bab66a863fb2814e93def897def
Signed-off-by: Jamal Haidar <jamal.haidar@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1429
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoChange the name of soft sensor sample bundle
Minji Park [Mon, 6 Jul 2015 07:15:31 +0000 (16:15 +0900)]
Change the name of soft sensor sample bundle

change files and folder name of soft sensor sample bundle

Change-Id: I615a127d7f538b93895700a3cc3ad9a396fb5816
Signed-off-by: Minji Park <minjii.park@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1531
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Hun-je Yeon <hunje.yeon@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoFix some string used for group management feature
Jihun Ha [Mon, 6 Jul 2015 05:10:38 +0000 (14:10 +0900)]
Fix some string used for group management feature

1. Instead of "oc", "oic" is used for decoding a JSON request in group management.
2. There are a difference of group interface string in octypes.h and ocapi.h.
   "oic.mi.def" will be used in the both.

Change-Id: I79763315926dc6e6bba3444db5ed94a68db65eb2
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1527
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
Reviewed-by: Junghyun Oh <junghyun.oh@samsung.com>
Reviewed-by: Patrick Lankswert <patrick.lankswert@intel.com>
9 years agoResolved Tizen build issue
vimala.v [Mon, 6 Jul 2015 11:21:16 +0000 (16:51 +0530)]
Resolved Tizen build issue

Change-Id: I8271eaf5f6a80b9efff5a1030ee94d91ab4569b4
Signed-off-by: vimala.v <vimala.v@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1533
Reviewed-by: Abhishek Sharma <ce.abhishek@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
9 years agoRefactor PrimitiveResponse and RequestHandler
coderhyme [Sat, 4 Jul 2015 03:48:25 +0000 (12:48 +0900)]
Refactor PrimitiveResponse and RequestHandler

Now PrimitiveSetResponse has AcceptanceMethod that indicates how to handle ResourceAttributes from request.
Belows are AcceptanceMehtod of PrimitiveSetResponse
Default : Follow handling policy of ResourceObject which will be implemented soon.
Ignore : Always ignore request attributes.
Accept : Always accept request attribuets, even if there is unknown value or different type with ResourceObject's attribute.

Change-Id: Ie67b9f8eeb6c56deace57a16e1535b9926fe3a5c
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1517
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoAdd missing methods to ResourceAttributes
coderhyme [Sat, 4 Jul 2015 02:33:16 +0000 (11:33 +0900)]
Add missing methods to ResourceAttributes

operator!=(Not equal) methods for ResourceAttributes and ResourceAttributes::Value.
swap method for ResourceAttributes::Value

Change-Id: I83d259e4034cf5b2926c10ac969ab85fd081dde8
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1514
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoFix memory leak in IP Monitor for tizen.
Jamal Haidar [Sat, 4 Jul 2015 08:35:08 +0000 (14:05 +0530)]
Fix memory leak in IP Monitor for tizen.

In CAWIFIConnectionStateChangedCb, netInfo pointer not freed.

Change-Id: I186ffd6ddc43a1fff717a06a6d8f445ba8165691
Signed-off-by: Jamal Haidar <jamal.haidar@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1518
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Reviewed-by: Erich Keane <erich.keane@intel.com>
9 years agoResource container update, API seperation (container, bundle)
Markus Jung [Mon, 6 Jul 2015 03:27:20 +0000 (12:27 +0900)]
Resource container update, API seperation (container, bundle)

Update on resource container. Bundle templates for c++ or Java-based protocol
bridge bundles. Common XML-based configuration.
Separated APIs and project skeletons for container and bundle templates.

Change-Id: Iacf3cc7bc860cfa42c2a50ed901ac7b786741a52
Signed-off-by: Markus Jung <markus.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1512
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agothings-manager: Fix cppcheck errors
Ravi Nanjundappa [Wed, 1 Jul 2015 09:02:58 +0000 (14:32 +0530)]
things-manager: Fix cppcheck errors

This patch fixes the errors reported by cppcheck tool for '(error) Mismatching
allocation and deallocation: newActionSet'.
Replaced free() calls with delete wherever the memory is allocated using new().

Change-Id: Icc22a8c7658c29afb8ed60b5cd9926e69ce3e6fb
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1506
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoFix memory leak in oicgroup file of cstack.
Jamal Haidar [Sat, 4 Jul 2015 09:47:12 +0000 (15:17 +0530)]
Fix memory leak in oicgroup file of cstack.

ClientRequestInfo *info memory leaked in case of SendAction() method
failure called in DoAction().

Change-Id: I81de9f0765cd9fdd3387ff98f6975df146dbbc2a
Signed-off-by: Jamal Haidar <jamal.haidar@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1521
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
Reviewed-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoMerge "Merge branch 'master' into resource-manipulation" into resource-manipulation
Uze Choi [Mon, 6 Jul 2015 02:42:54 +0000 (02:42 +0000)]
Merge "Merge branch 'master' into resource-manipulation" into resource-manipulation

9 years agoFix memory leak in SSM processQueryResult.
Ankur Bansal [Sat, 4 Jul 2015 09:16:35 +0000 (14:46 +0530)]
Fix memory leak in SSM processQueryResult.

Update logic in CQueryEngine::processQueryResult to free
pDataReader in case of error.

Change-Id: I14cb27cd5c56731632fc6288cec555807f96ba97
Signed-off-by: Ankur Bansal <ankur.b1@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1520
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Minji Park <minjii.park@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoFix memory leak in SSM executeContextQuery.
Ankur Bansal [Sat, 4 Jul 2015 07:48:46 +0000 (13:18 +0530)]
Fix memory leak in SSM executeContextQuery.

Update logic in CQueryEngine::executeContextQuery to free
clsContextQuery in case of error.

Change-Id: Ife66485b61a5f64ff5f190787482cdf6737850dd
Signed-off-by: Ankur Bansal <ankur.b1@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1519
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Minji Park <minjii.park@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoUpdated Resource Client
Jay Sharma [Sat, 4 Jul 2015 14:51:34 +0000 (20:21 +0530)]
Updated Resource Client

- Updated as per new APIs.

Change-Id: I7c3118cdd6690911a26ad4aaddb67a6d10afec9f
Signed-off-by: Jay Sharma <jay.sharma@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1524
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoFix setting callback to use move operation in PrsenceSubscriber
coderhyme [Sat, 4 Jul 2015 02:46:49 +0000 (11:46 +0900)]
Fix setting callback to use move operation in PrsenceSubscriber

It was copying callback which is unneccesary overhead.

Change-Id: Ic867a1e68225a95b2537737c9290ec0d3fe6354c
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1516
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
9 years agoFix setting callback to use move operation in PrimitiveResource
coderhyme [Sat, 4 Jul 2015 02:35:48 +0000 (11:35 +0900)]
Fix setting callback to use move operation in PrimitiveResource

It was copying callback which is unneccesary overhead.

Change-Id: Iee927bb1192de7d8b8af71922f948e0428073ca2
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1515
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoMerge branch 'master' into resource-manipulation
hunje.yeon [Mon, 6 Jul 2015 01:23:08 +0000 (10:23 +0900)]
Merge branch 'master' into resource-manipulation

Apply stack error fix from 'master' branch into 'resource-manipulation' branch

Change-Id: I768f2c4404985e2dd50855a665b6819fa6d97f43
Signed-off-by: hunje.yeon <hunje.yeon@samsung.com>
9 years agoFix memory leak in SSM Sensor Processor
Ankur Bansal [Thu, 2 Jul 2015 13:09:17 +0000 (18:39 +0530)]
Fix memory leak in SSM Sensor Processor

Fix memory leak in CResourceFinder::onExecute. Delete resource handler
in case of Error.

Change-Id: I3d2363ed0b2585ffcbc403417fd73f60e89f1a88
Signed-off-by: Ankur Bansal <ankur.b1@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1490
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Minji Park <minjii.park@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoprotocol-plugin: sample-app: add missing lib to mqttclient
Hauke Mehrtens [Mon, 29 Jun 2015 21:29:47 +0000 (23:29 +0200)]
protocol-plugin: sample-app: add missing lib to mqttclient

The mqttclient file does not link successfully on OpenWrt with boost
1.58.0. Without this patch I am getting this error message:

out/linux/arm/release/service/protocol-plugin/sample-app/linux/mqtt/mqttclient.o: In function `_GLOBAL__sub_I_mqttclient.cpp':
mqttclient.cpp:(.text.startup+0x7a0): undefined reference to `boost::system::generic_category()'
mqttclient.cpp:(.text.startup+0x7a8): undefined reference to `boost::system::generic_category()'
mqttclient.cpp:(.text.startup+0x7b0): undefined reference to `boost::system::system_category()'
out/linux/arm/release/libppm.a(PluginManager.o): In function `_GLOBAL__sub_I_PluginManager.cpp':
PluginManager.cpp:(.text.startup+0x8): undefined reference to `boost::system::generic_category()'
PluginManager.cpp:(.text.startup+0x1c): undefined reference to `boost::system::generic_category()'
PluginManager.cpp:(.text.startup+0x28): undefined reference to `boost::system::system_category()'

Change-Id: Ib5728b37609de6b9b426888c77eb3522eb5e0b7d
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1446
Reviewed-by: Erich Keane <erich.keane@intel.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Younghyun Joo <yh_.joo@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agostack: Fixes cppcheck issue in ocserverrequest
Ravi Nanjundappa [Wed, 1 Jul 2015 13:44:42 +0000 (19:14 +0530)]
stack: Fixes cppcheck issue in ocserverrequest

This patch fixes the the below issue reported by
cppcheck tool in stack dir:
"(error) Possible null pointer dereference:
ehResponse - otherwise it is redundant to check if
ehResponse is null at line 445
"

Dereferencing of ehResponse is done after NULL check.

Change-Id: I9cc20ce2386b5bdb08c4d9f9dbd2d143040f9a0f
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1509
Reviewed-by: Erich Keane <erich.keane@intel.com>
Tested-by: Erich Keane <erich.keane@intel.com>
9 years agocsdk: Fixes issue reported by cppcheck tool
Ravi Nanjundappa [Wed, 1 Jul 2015 13:36:20 +0000 (19:06 +0530)]
csdk: Fixes issue reported by cppcheck tool

This patch fixes the the below issue reported by cppcheck tool:
"(error) Possible null pointer dereference: ReqInfo - otherwise it is
redundant to check if ReqInfo is null at line 234".

Null value check of ReqInfo is removed as it in unnecessary here, as this check is
already done and OIC_LOG_BUFFER is just printing the content of ReqInfo->info.token.

Change-Id: I8c15d8b582135c445fe89350dc67812e531c52d3
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1507
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
9 years agoIntegrated singlethread and multithread files of BLE adapter.
vimala.v [Fri, 3 Jul 2015 05:22:36 +0000 (10:52 +0530)]
Integrated singlethread and multithread files of BLE adapter.

Removed all "_singlethread" files related to BLE adapter.

Change-Id: Idad8e8a488d7b2d742f7082116f9bd4895175d8f
Signed-off-by: vimala.v <vimala.v@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1035
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
9 years agoMerge branch 'master' into resource-manipulation
hunje.yeon [Fri, 3 Jul 2015 07:21:44 +0000 (16:21 +0900)]
Merge branch 'master' into resource-manipulation

Update the lastest changes of 'master' into 'resource-manipulation' branch

Change-Id: I1ddc4f152f0408646c687fbc0ed9fdac0bd83291
Signed-off-by: hunje.yeon <hunje.yeon@samsung.com>
9 years agoChange names of include-guards of primitiveResource headers
coderhyme [Thu, 2 Jul 2015 10:54:27 +0000 (19:54 +0900)]
Change names of include-guards of primitiveResource headers

Add prefixes to include-guards to lower possibility of conflicts with others.
Fix a file name 'ResourceAttributesConverter.h', there was a typo.

Change-Id: I76345b4c444ed242e8b3d307a550ba1f0c043b69
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1501
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoSeparate implementation of PrimitiveRequest
coderhyme [Thu, 2 Jul 2015 10:53:49 +0000 (19:53 +0900)]
Separate implementation of PrimitiveRequest

The class will be exposed as a part of the api.

Change-Id: I18b641ab5cf2dcb070db5bd302ffedb331f887f0
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1500
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoChange the class name of PrimitveServerResource to ResourceObject
coderhyme [Thu, 2 Jul 2015 10:48:57 +0000 (19:48 +0900)]
Change the class name of PrimitveServerResource to ResourceObject

Terminology of the Primitive is not specific.

Change-Id: I473310416076eb6929e00a1d4c47b05f7ae858fb
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1499
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
9 years agoDistributed Resource Hosting Sample App and ResourceHosting for JAVA API folder.
doil.kwon [Thu, 2 Jul 2015 09:05:26 +0000 (18:05 +0900)]
Distributed Resource Hosting Sample App and ResourceHosting for JAVA API folder.

- Added new folder in NotificationManager folder
- "/NotificationManger/android/resource_hosting"

Modified notification-manager's Sconscript

- ~_JNI.cpp file is not included in Sconscript.

Changed folder name : ResourceHostingSampleApp->SampleResourceHosting

Deleted files : resourceCoordinator_JNI.cpp and resourceCoordinator_JNI.h in Notification/src folder.

Modified about ResourceHosing_JNI.h path is relative path to absolute path in ResourceHosing_JNI.cpp
Added "OCProcessFunc"'s  return value : none -> return;

Change-Id: I2c44c31f1399ca9722c4f2281ec2b8af1646ed21
Signed-off-by: doil.kwon <doil.kwon@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1487
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoAdd common module that expiryTimer.
ChaJiWon [Fri, 3 Jul 2015 06:32:06 +0000 (15:32 +0900)]
Add common module that expiryTimer.

check expiryTime & excute callback

destructor change to public type in ExpiryTimer.h
exclude the internal header code

Change-Id: Ic773fddaaf8332950a53eeb99e8a50a42ea75637
Signed-off-by: ChaJiWon <jw_wonny.cha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1467
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
9 years agoIntegrated IP adapter Singlethread and Multithread files
vimala.v [Wed, 1 Jul 2015 05:28:31 +0000 (10:58 +0530)]
Integrated IP adapter Singlethread and Multithread files

Removed all "_singlethread" files related to IP adapter.

Change-Id: I8a096ca6b28f74afaa8d122bf416cb4b0733f185
Signed-off-by: vimala.v <vimala.v@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1010
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
9 years agoUpdate to OICSensorboard example
Juliet Cai [Thu, 2 Jul 2015 17:31:35 +0000 (10:31 -0700)]
Update to OICSensorboard example

Change OC_ALL to CT_DEFAULT in client.cpp to compile with the latest API

Change-Id: I4654afefc72f9a95a41a23e36ed4f3172afe414d
Signed-off-by: Juliet Cai <juliet.z.cai@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1493
Reviewed-by: Erich Keane <erich.keane@intel.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
9 years agofixed memory leak in CA
jihwan.seo [Thu, 2 Jul 2015 09:56:36 +0000 (18:56 +0900)]
fixed memory leak in CA

As the uri is moved from Endpoint to CAInfo structure currently.
but 'free()' was not updated at that time.
so 'free()' is also need in here and there.

Change-Id: I1b3429c29c769c5920dd427688e97b517dd94f66
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1488
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: John Light <john.j.light@intel.com>
Reviewed-by: Erich Keane <erich.keane@intel.com>
9 years agoFix send LE adapter sendRequestToAll
jnashok [Tue, 30 Jun 2015 13:42:43 +0000 (22:42 +0900)]
Fix send LE adapter sendRequestToAll

Change-Id: I5892851829b56e4a52d5b66d1711554b4b7c4530
Signed-off-by: jnashok <jn.ashok@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1458
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Reviewed-by: Erich Keane <erich.keane@intel.com>
9 years agoAdded camutex no operation file.
vimala.v [Tue, 30 Jun 2015 04:52:23 +0000 (10:22 +0530)]
Added camutex no operation file.

This change will be used for singlethread and multithread integration
to avoid the usage of #ifdef around camutex api's.

Change-Id: Ie483c16cd0ac1d194a77fd94a8b9dd459e75509a
Signed-off-by: vimala.v <vimala.v@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1455
Reviewed-by: Abhishek Sharma <ce.abhishek@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
9 years agoChanged BLE UUID defined in Tizen according to OIC Spec
vimala.v [Wed, 1 Jul 2015 12:19:20 +0000 (17:49 +0530)]
Changed BLE UUID defined in Tizen according to OIC Spec

Change-Id: I92dd97c6176484c621f37d6d946aee683c3da35d
Signed-off-by: vimala.v <vimala.v@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1475
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Abhishek Sharma <ce.abhishek@samsung.com>
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Reviewed-by: Erich Keane <erich.keane@intel.com>
9 years agoApply namespace OIC::Service.
jyong2.kim [Wed, 1 Jul 2015 08:12:51 +0000 (17:12 +0900)]
Apply namespace OIC::Service.

moved Broker's whole class into namespace OIC::Service.
added exception of Broker API.
changed hostResource return type to const type.
changed cancelHostResource return type to void.
aligned source and header files.
Added initializer for each class.

Change-Id: I65278e2eab1c3621240e9242bdd3f07d592f7911
Signed-off-by: jyong2.kim <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1472
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoChange vague variable name in ResourceAttributes
coderhyme [Thu, 2 Jul 2015 01:18:25 +0000 (10:18 +0900)]
Change vague variable name in ResourceAttributes

keyValues is not cleared for attribute map. It is changed to values.

Change-Id: I80116e2f017b4b5e1602e2b914389ca91df3f48c
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1485
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoAdd sid getter to PrimitiveResource
coderhyme [Thu, 2 Jul 2015 01:17:40 +0000 (10:17 +0900)]
Add sid getter to PrimitiveResource

Add sid getter requested by broker

Change-Id: Ib00fb700ce25188d800abe637fe35395df25c313
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1484
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoAdd missing methods to ResourceAttributes and test for one of them
coderhyme [Wed, 1 Jul 2015 01:48:24 +0000 (10:48 +0900)]
Add missing methods to ResourceAttributes and test for one of them

Add missing move constructor definition and rval reference key accessor

Change-Id: I6ac5725fc223accdab8fbaea397f6567674264f9
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1466
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoRemove dependency on OC from serverBuilder tests using mock
coderhyme [Wed, 1 Jul 2015 01:47:03 +0000 (10:47 +0900)]
Remove dependency on OC from serverBuilder tests using mock

To keep unit tests simple and quick

Change-Id: I0bed8dc4c47eecfff3eb5b7a8437bf020324e9c6
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1465
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoAdd resource type parameter to server builder to prevent registerResource error
coderhyme [Tue, 30 Jun 2015 02:37:07 +0000 (11:37 +0900)]
Add resource type parameter to server builder to prevent registerResource error

To prevent crash in unit test by an exception thrown by base when resource type is empty

Change-Id: I924f568593839a4ddf9ef39a1695452ad1c77549
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1451
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
9 years agoReplace expectOCStackResultOK with invokeOCFunc which is safer
coderhyme [Wed, 1 Jul 2015 01:44:36 +0000 (10:44 +0900)]
Replace expectOCStackResultOK with invokeOCFunc which is safer

Add new methods to primitiveServeResource(removeAttribute and setAttribute with rval ref key)

Change-Id: I796599584fab56dfef697140b819069e3a9612b7
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1464
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>