- 27 Nov, 2018 3 commits
-
-
Rami Jung authored
in order to improve readability and reduce complexity, network_event_thread uses following subfuncions - setting UDP/TCP sockets - receiving UDP/TCP messages Change-Id: Idd4642ca9d83944e008a130b336378b7a6f38c36 Signed-off-by:
Rami Jung <rami.jung@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27529Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
Kishen Maloor authored
Change-Id: I34d3238d7621dc8a958170d1ff313928ce474ef1 Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27581Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org>
-
Kishen Maloor authored
Change-Id: I3f9f3c44fc52b5536bc211218e8ae945d93fba80 Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27579Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org>
-
- 26 Nov, 2018 6 commits
-
-
George Nash authored
Change-Id: I7d37ad483f4ec111466e8930145a1b5830fdfba4 Signed-off-by:
George Nash <george.nash@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27443Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
Kishen Maloor authored
This change introduces API and behavioral improvements to on-boarding functionality. Specifically, all oc_obt_xxx APIs accept an oc_uuid_t handle to refer to an OCF device. These are directly provided in the owned/un-owned device discovery callback, and it is assumed that applications would cache them for use in all future oc_obt invocations. It is further assumed that applications would distinguish between UUIDs of owned and un-owned devices and adjust its caches accordingly before and after ownership transfer. The callback following ownership transfer is also provided an oc_uuid_t reflecting an OCF device's persistent UUID. An application may use this as an opportunity to populate its owned device cache, without having to rediscover owned devices. The callbacks for provision ACE and hard RESET are also now provided an oc_uuid_t referring to the device in question. The callbacks for owned/un-owned device discovery are now invoked soon after responses arrive and not after some timeout/delay as was previously the case. This improves the user experience of the OBT. This change also by its nature fixes bugs that previously existed in oc_obt usage. The sample on-boarding tool has been updated to employ these changes. Change-Id: I95d90647fd64570fe8f55c0dfd525a884679bc3a Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27577Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org>
-
Jaehyun Cho authored
If core resource test is executed in non-secure build, it will be stuck when read random value. So, oc_random_init/destory() is added when OC_SECURITY flag is not defined in core resource test. Change-Id: I0cd7b28a609a95465e1603ef10e38117ad6d7f38 Signed-off-by:
Jaehyun Cho <jaehyun3.cho@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27223Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
George Nash authored
This adds tests for: - get/set objects - get/set object arrays Change-Id: I5ed3a2dcd0fa16845f9429c3c413c66163d163fc Signed-off-by:
George Nash <george.nash@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27457Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
Sören Tempel authored
oc_connectivity_get_endpoints might return NULL. Additionally, the dst interface_index and the endpoint interface_index might never match. Meaning: The end of the linked list could be reached, if that happens dst is NULL and the current code would perform a null pointer dereference in the next loop iteration potentially causing a segfault. This was discovered by sending a CoAP GET request to the example server with libcoap's coap-client utility: $ coap-client coap://localhost/oic/res Change-Id: I4928248dd8c04fa6117edcace30688a256550463 Signed-off-by:
Sören Tempel <tempel@uni-bremen.de> Reviewed-on: https://gerrit.iotivity.org/gerrit/27541Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
George Nash authored
This adds tests for many of the data types supported by the oc_rep.h. Some documentation added. Some error logging also added. Change-Id: I10fbe044447b7b397d023713d6725f262039d896 Signed-off-by:
George Nash <george.nash@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27421Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Larry Sachs <larry.j.sachs@intel.com> Reviewed-by:
Rick Bell <richard.s.bell@intel.com> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 21 Nov, 2018 1 commit
-
-
Kishen Maloor authored
Change-Id: I35310680328b46ee5512be54f96807653e627c80 Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27515Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org>
-
- 07 Nov, 2018 8 commits
-
-
Kishen Maloor authored
Change-Id: Ie2055874ea80bc777e3b84a87fb54366447b3d55 Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27419Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org>
-
Kishen Maloor authored
Change-Id: I3085f30bac9125b46080d00b5a5fdd33a1d10a92 Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27409
-
Kishen Maloor authored
Change-Id: I79fc174b1a8f339dddd11643f8068ff74b066616 Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27407Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org>
-
Kishen Maloor authored
Change-Id: I3cdb6bbda80da7770786d1e0545ff394c7b4f116 Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27405Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org>
-
Kishen Maloor authored
Change-Id: I90d5c05f40a2d70f36dc93c3d1cee90db2d4ae40 Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27403Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org>
-
Kishen Maloor authored
Change-Id: I3f313a95157696805923bdfcbc5d7c434092a0f5 Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27401Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org>
-
Kishen Maloor authored
Commit f37e3cc7 calculates the size of CoAP_UDP/ CoAP_TCP headers and fails gracefully when header size exceeds the pre-defined COAP_MAX_HEADER_SIZE. However, this failure is not propagated to consumers of the CoAP serialize function. This change checks if CoAP serialization failed, and in those cases it clears the currently allocated transaction object and other associated state. Change-Id: Ieb60c01665ed58bab8cab66185e57214fbf5f8c0 Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27399Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org>
-
Jaehyun Cho authored
To calculate coap option length, it use serialize option with NULL pointer array to get only length value and actual serialization for option is followed. This makes unuseless duplicate log. So I add check logic whether buffer is valid or not. Only buffer is exist, serialize log can be printed. Change-Id: Iefa49c9437183aeec6f426f1695387d76eb7f07f Signed-off-by:
Jaehyun Cho <jaehyun3.cho@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27395Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 06 Nov, 2018 6 commits
-
-
George Nash authored
Change-Id: I299a1bb31428007f97ea60d2bda0ee66ea63fc68 Signed-off-by:
George Nash <george.nash@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27369Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Larry Sachs <larry.j.sachs@intel.com> Reviewed-by:
Rick Bell <richard.s.bell@intel.com> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
George Nash authored
Change-Id: I1aec0887ccd8a3aa9f371f56683d71970ca45c4c Signed-off-by:
George Nash <george.nash@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27387Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com> Tested-by:
Kishen Maloor <kishen.maloor@intel.com>
-
iot authored
After calculating lenght of option_array it serializes option to buffer directly. if the assumpting size is bigger than HEADER, then it exits Change-Id: I9759e150718bcf602e6c17a68806c9a2c3112bdc Signed-off-by:
iot <rami.jung@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27039Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
Jaehyun Cho authored
config.h is finde of common naming. So some RTOS environments can be conflict with same name of different header file. To avoid this, our config.h is changed to oc_config.h Change-Id: Ie32e476d5e5573c388f729f7ab48aab1c4df3c04 Signed-off-by:
Jaehyun Cho <jaehyun3.cho@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27241Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Uze Choi <uzchoi@samsung.com> Reviewed-by:
Jaehong Jo <jaehong.jo@samsung.com> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
Sören Tempel authored
The code had two problems which are addressed in this commit: 1. In `oc_ri_process_discovery_payload` it isn't checked if `rep` is NULL before accessing the value member of the struct represented by it. This has been introduced in a7a84258. 2. In `oc_parse_rep` the `out_rep` parameter isn't set if the cbor document is neither an array nor a map. Therefore the `rep` variable in `oc_ri_process_discovery_payload` might be uninitialized after a call to `oc_parse_rep`. This can potentially be exploited to cause a denial of services (crashing the IoTivity client) if an attacker is able to join the multicast group used for the discovery process. Change-Id: I617b8c2408d2d7276c192d20300c3ea616aedfbf Signed-off-by:
Sören Tempel <tempel@uni-bremen.de> Reviewed-on: https://gerrit.iotivity.org/gerrit/27289Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
Sören Tempel authored
This header file defines the `fd_set` type used by the `ip_context_t` type. Without including this header file the type might not be defined on some platforms thereby causing a build failure. Change-Id: I2b0f5f5c432d6c142c7506b52819a7008559f08d Signed-off-by:
Sören Tempel <tempel@uni-bremen.de> Reviewed-on: https://gerrit.iotivity.org/gerrit/27287Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 05 Nov, 2018 1 commit
-
-
George Nash authored
The windows samples were incorrectly calculating the sleep time for the SleepConditionVariableCS function. The samples continued to work thanks to the fact that the condition var signal was causing the samples to run correctly. Bug: https://jira.iotivity.org/browse/LITE-23 Change-Id: I70eb8fe55617782630caaa42205ab6cfd97736fa Signed-off-by:
George Nash <george.nash@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27373Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 24 Sep, 2018 2 commits
-
-
Kishen Maloor authored
Change-Id: I60412ca855079829a8014fca73eb29ba1eb9dcb7 Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27053Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org>
-
Kishen Maloor authored
Change-Id: I29b50a04882e7f0c7814ecbea2096ca0c0b44bba Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/27051Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org>
-
- 14 Sep, 2018 4 commits
-
-
George Nash authored
This will change the `oc_resource_bind_resource` to accept `oc_interface_mask_t` instead of `uint8_t`. Searching through the code base shows that the value always passed into the `oc_resource_bind_resource` function are values from the `oc_interface_mask_t`. Change-Id: Ib3a2bdfe2e9a9e2b63839804bcd8c8a06901fe43 Signed-off-by:
George Nash <george.nash@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/26955Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
Jaehong Jo authored
When get the error during calculate_string_length, it can occur crash like below code in oc_alloc_string. oc_assert(alloc_ret > 0); So added checking the error and len. Change-Id: I0e7932332873842859b3dd70b01f03d6c62ac892 Signed-off-by:
Jaehong Jo <jaehong.jo@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/26879Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
Jaehong Jo authored
If stack received crafted packet without string key, it can occur crash in tinycbor like below code. cbor_assert(cbor_value_is_byte_string(value) || cbor_value_is_text_string(value)) Change-Id: I1ac137ab475faa592dadcc426ff530bef2c7e6fd Signed-off-by:
Jaehong Jo <jaehong.jo@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/26869Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
Jaehong Jo authored
If an option is over data, the stack occur a crash. Because unexpected sections are referenced. Change-Id: I965c80f53a8df1ae8998cd5fa12f3908acc3a924 Signed-off-by:
Jaehong Jo <jaehong.jo@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/26881Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com> Tested-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 13 Sep, 2018 3 commits
-
-
Jaehong Jo authored
When meet the invalid type with advance during cbor parsing, it can occur crash like below code. cbor_assert(it->type != CborInvalidType); So added checking the invalide type and return. Change-Id: I6f3ebd681f3482cf6b0f57038d65567dc53bbda9 Signed-off-by:
Jaehong Jo <jaehong.jo@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/26875Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
Inho Oh authored
Some .c files are missing for #include "{self-module}.h" Change-Id: I29035b19cef6b36ecbdd9780e784105ea8494215 Signed-off-by:
Inho Oh <webispy@gmail.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/26857Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
Inho Oh authored
This patch add missing 'static' to internal functions. Change-Id: I54ac720ef44a378bfcf775ead74de452138875f0 Signed-off-by:
Inho Oh <webispy@gmail.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/26855Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 14 Aug, 2018 1 commit
-
-
Kishen Maloor authored
* Make DYNAMIC=1 the default in the Linux Makefile which can be overridden while invoking Make. * Fix memory leaks in unit tests. * Fix leaks in oc_main_init/shutdown sequences when oc_main_init() returned with an error. * Add EXTRA_CFLAGS while building apitest that was previously omitted. Change-Id: I4b14daf6d82236c49cca3807761701f50ad0eab3 Signed-off-by:
Kishen Maloor <kishen.maloor@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/26767Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org>
-
- 13 Aug, 2018 4 commits
-
-
George Nash authored
The following was added to the header files so they could be include in C++ programs: #ifdef __cplusplus extern "C" { #endif //C functions here #ifdef __cplusplus } #endif With this added the extern "C" was removed from the unittest code since it was will no longer be needed. Change-Id: Ifcea38413dde9b0d94c04a9e3d2925a3b63eb63f Signed-off-by:
George Nash <george.nash@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/26745Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
Jaehyun Cho authored
In case of deleting resource using oc_delete_resource(), add remove observer logic in delete resource logic. If observer is not removed when delete resource, it will occur crash when remove every observers from shutdown(because observer has resource pointer in their member struct). Change-Id: Ic71b90b76fce43df2ca7d8aa2a3904d892959044 Signed-off-by:
Jaehyun Cho <jaehyun3.cho@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/26575Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Jaehong Jo <jaehong.jo@samsung.com> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
Jaehong Jo authored
When we get IPv6 address using inet_ntop, there are not include [(prefix) and ](suffix). So added them when we get IPv6 address. Change-Id: Ia8bf48665627e1163bf17cf77e5f9734d9149994 Signed-off-by:
Jaehong Jo <jaehong.jo@samsung.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/26743Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
jaehyun Cho <jaehyun3.cho@samsung.com> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
George Nash authored
The`size_t` type is used to represent the size of an object. It is defined as the return type of the sizeof operator. As an implication size_t is used for holding an array index. Many of the functions that would naturally return `size_t` also return -1 when an error has occured. To hold the error these functions still return int or long. Being consistant with the usage of `size_t` helps reduce the amount of casting when compiling for systems that are not 32-bit. This is a first pass through the code to identify locations that `int` or `long` was used when `size_t` probably should have been used. This is not an exastive update. Change-Id: I040f4c00cb5b3fd97810381d2f0a3e7ab82213ad Signed-off-by:
George Nash <george.nash@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/26619Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-
- 09 Aug, 2018 1 commit
-
-
George Nash authored
This change adds unit test code for oc_base64 code. This uses some test vectors (input/output) obtained from RFC-4648 While testing error conditions I found two errors that were not properly handled in the oc_base64_decode. - The input is not long enough to be a base64 encoded string. - The padding character `=` in not at the end of the encoded string Also changes inputs that represent the size of the array to size_t instead of int. Since the return value is also used to detect errors I left it as int. Doxygen style documentation was added to the encode/decode functions. Small modification to the Makefile. It now places the object files before the library files. If the Linker scans the library files first it may not grab a dependency need for the object files. This does not happen if the object files are first. This modification was made due to an `undefined reference` error when the base64test code was added. This fix also made it possible to remove part of the build comand that was repeated. When building the apitest program. Change-Id: I15bda772d2a64b48e28f259059b73e4d310f419f Signed-off-by:
George Nash <george.nash@intel.com> Reviewed-on: https://gerrit.iotivity.org/gerrit/26605Tested-by:
IoTivity Jenkins <jenkins-daemon@iotivity.org> Reviewed-by:
Kishen Maloor <kishen.maloor@intel.com>
-