rtos/tinyara.git
7 years agotls : add license files (Apache v2.0)
Jin-Seong Kim [Mon, 26 Jun 2017 23:29:31 +0000 (08:29 +0900)]
tls : add license files (Apache v2.0)

This commit is to add license files
 - apache-2.0.txt : full statement of license

Change-Id: Ibb85ef283bbd0080894b2e1e6b497e489dcc3f3e
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agonetutils/codec : separates build source codes in Makefile
Jin-Seong Kim [Mon, 26 Jun 2017 04:53:43 +0000 (13:53 +0900)]
netutils/codec : separates build source codes in Makefile

This commit is to separate build source codes in Makefile
 - base64.c, md5.c and urldecode.c codes are compiled,
   when CONFIG_NETUTILS_CODEC is enabled
 - separates them accordingly its specific configuration

Change-Id: I157fd5077673c075b16b79f341ad21dec8e062e9
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agoexamples/libcoap_client : fix memory leakage on libcoap_client
Jin-Seong Kim [Fri, 23 Jun 2017 06:27:12 +0000 (15:27 +0900)]
examples/libcoap_client : fix memory leakage on libcoap_client

This commit is to fix memoray leakage on libcoap_client
 - TizenRT should free allocated memory by using free
 - payload.s and optlist has not-freed memory so, fix them

Change-Id: I07e2bc0ceca0138dd8a68c4ae07a926ad94e8615
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agolibc/netdb : fix overflow issue on DNS send buffer
Jin-Seong Kim [Fri, 23 Jun 2017 09:00:53 +0000 (18:00 +0900)]
libc/netdb : fix overflow issue on DNS send buffer

This commit is to fix overflow issue on DNS send buffer
 - dns query is consists of as below :
   header (12 bytes)+  dns hostname (variables) + query type (2 bytes)
   + query class (2 bytes)
 - previously send buffer size is fixed size of 64 bytes,
   when hostname is larger than 48 bytes, send buffer is going to
   be overflowed
 - to prevent corruption of send buffer, set SEND_BUFFER_SIZE accordingly
   hostname size

Change-Id: I6428311e51a2db002dde5265e7d7de80ee5cd1bd
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agonetutils/libcoap : trivial patches, to improve stabliity of code
Jin-Seong Kim [Fri, 23 Jun 2017 03:10:03 +0000 (12:10 +0900)]
netutils/libcoap : trivial patches, to improve stabliity of code

This commit is to fix static analysis defects
 - fix defects types as belows :
   1. defererences of null value
   2. memory leakage
   3. fix precedence
   4. unchekced function returns

Change-Id: I617161d1aee5b58dbe2f24a05724d3b023e6155d
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agoexternal/wakaama : fixes memory leakage in tcp api
Seongeun Choi [Fri, 23 Jun 2017 11:32:36 +0000 (20:32 +0900)]
external/wakaama : fixes memory leakage in tcp api

This patch fixes memory leakage issue in tcp api.
Without this commit, 32 bytes are not released when client is
registered over tcp.

Change-Id: Iad0fc2e474acfee96742b571264a7c85da676b7f
Signed-off-by: Seongeun Choi <seongeun.choi@samsung.com>
7 years agoexamples/lwm2m_test : fixes memory leakage
Seongeun Choi [Mon, 12 Jun 2017 07:58:41 +0000 (16:58 +0900)]
examples/lwm2m_test : fixes memory leakage

This patch fixes memory leakage issues in the prv_add(),
prv_remove() and prv_create_client() functions.

Change-Id: I2ebb268099cd5d5da603c51b0851aa958ba6cf2c
Signed-off-by: Seongeun Choi <seongeun.choi@samsung.com>
7 years agonet/tls: fixes memory leakage in easy tls api.
Junyeon LEE [Fri, 23 Jun 2017 14:02:53 +0000 (23:02 +0900)]
net/tls: fixes memory leakage in easy tls api.

This commit is to fix memory leakage in easy tls api.
Without this commit, tls_ctx and tls_session structures
are not freed and remain in memory.

Change-Id: Idea8bf2a44d1401e81f97a377a5480c580c96d92
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agoexamples/lwm2m_test: fixes lwm2m_test usage.
Junyeon LEE [Fri, 23 Jun 2017 14:54:38 +0000 (23:54 +0900)]
examples/lwm2m_test: fixes lwm2m_test usage.

This commit fixes wrong usage about psk and addes guide for
all input combination.

Change-Id: I79168f07f628c8b54908ed2cffc4721a096a358e
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agoexamples/libcoap: fix compile error in example.
Junyeon LEE [Fri, 23 Jun 2017 13:58:34 +0000 (22:58 +0900)]
examples/libcoap: fix compile error in example.

This commit is to fix below compilation error on client example.

CC: libcoap-client.c
libcoap-client.c:787:47: error: '_token_data' is static but used
            in inline function 'cmdline_token' which is not static [-Werror]
  strncpy((char *)the_token.s, arg, min(sizeof(_token_data), strlen(arg)));
                                               ^
libcoap-client.c:82:32: note: in definition of macro 'min'
 #define min(a,b) ((a) < (b) ? (a) : (b))
                                ^
ibcoap-client.c:787:47: error: '_token_data' is static but used
            in inline function 'cmdline_token' which is not static [-Werror]
  strncpy((char *)the_token.s, arg, min(sizeof(_token_data), strlen(arg)));
                                               ^
libcoap-client.c:82:20: note: in definition of macro 'min'
 #define min(a,b) ((a) < (b) ? (a) : (b))
                    ^
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
Change-Id: I820e3c872ca100b9e34027e1d28e4b4f42c78d11

7 years agoexternal/wakaama : Fix compilation error on client example
Jin-Seong Kim [Wed, 21 Jun 2017 04:31:15 +0000 (13:31 +0900)]
external/wakaama : Fix compilation error on client example

This commit is to fix compilation error on client example
 - use global lwm2mH variable instead of shadowed variable in the function
 - initialize variables and remove un-used variables
 - fix compiliation eror of mismatched data type on connectivity_interface
 - fix return value of client_main function
 - add protocol parameter on connection_create and create_socket APIs
 - add common_monitor_interface files to prevent build error
   on connectivity_interface

Change-Id: Ib1e694a76823edf6b30ea4ccc52487a3d1741aea
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agoexample/webclient : Fix compilation error without TLS option
Jin-Seong Kim [Wed, 21 Jun 2017 07:48:57 +0000 (16:48 +0900)]
example/webclient : Fix compilation error without TLS option

This commit is to fix compilation error on webclient example without TLS

 1. add (char *) cast in front of malloc
 webclient_main.c: In function 'webclient_init_request':
 webclient_main.c:245:21:
 error: assignment makes pointer from integer without a cast [-Werror]
     request->entity = malloc(t);

 2. add stdlib.h
 webclient_main.c:237: undefined reference to `atoi'
 webclient_main.c:239: undefined reference to `atoi'
 webclient_main.c:243: undefined reference to `atoi'

Change-Id: I85859de77349dcd922237b3737f7039873913e20
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agoexternal/wakaama : Update wakaama client from wakaama gitHub
Jin-Seong Kim [Wed, 21 Jun 2017 02:35:08 +0000 (11:35 +0900)]
external/wakaama : Update wakaama client from wakaama gitHub

This commit is for Updating wakaama client from wakaama gitHub[1]
[1] https://github.com/eclipse/wakaama
 - To synchronize patched on core functions, update client example

Change-Id: I70ed3eeb673ef93b33010bc684576e100c3db803
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agoexternal/wakaama : Revert client example to 1.0_Public_M1 version
Jin-Seong Kim [Wed, 21 Jun 2017 02:20:22 +0000 (11:20 +0900)]
external/wakaama : Revert client example to 1.0_Public_M1 version

This commit is revert commit for wakaama client example
 - SW R&D Center(DS) has been seperated client example from DM framework
   wakaama client example will be only used by DM framework
   So, we'll revert our patches on client example to prevent
   maintaining issue on it

Change-Id: I6d75c729b4d694025af067a0cb84d1b9ba132805
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agospi: fix mismatched return types of SPI_SETMODE and SPI_SETBITS
Wonsang Ryou [Wed, 21 Jun 2017 02:09:42 +0000 (11:09 +0900)]
spi: fix mismatched return types of SPI_SETMODE and SPI_SETBITS

Even if the return types of .setmode and .setbits operations had been
changed to void in commit f5dd07d5a922 ("spi: iotbus: fix mismatched
prototype declarations"), the return types of SPI_SETMODE and
SPI_SETBITS macros are still int.

This patch corrects the return types of SPI_SETMODE and SPI_SETBITS.
(int -> void)

Change-Id: I3b5e6a3bda3759303e84a4b31fe90a67d3a88720
Signed-off-by: Wonsang Ryou <wonsang.yoo@samsung.com>
7 years agoRevert "external/wakaama: remove tinydtls library"
Junyeon LEE [Fri, 16 Jun 2017 04:54:37 +0000 (13:54 +0900)]
Revert "external/wakaama: remove tinydtls library"

Supporting DM framework, we enables tinydtls library.

This reverts commit 2308e97dfb9a78ff0f9fb5b4c88520531bfd8e04.

Change-Id: I4316a67bec85e98b46d0ecc952fbc227859f89b4
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonetutils/http: fixes minor issues in webserver and webclient
Junyeon LEE [Mon, 19 Jun 2017 19:50:57 +0000 (04:50 +0900)]
netutils/http: fixes minor issues in webserver and webclient

This commit fixes several minor issues in webserver and webclient.
  . unopened message queue can be used in http_server_handler()
  . unreleased file descriptor in http_handle_file()
  . double free problem in client_send_request()
  . uninitialized response structure is able to make abort problem.

Change-Id: I119c4a2ea64ae575153a4a7772d4ef104b87a68c
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonetutils/websocket: check returning value of pthread_ funcion
Junyeon LEE [Mon, 19 Jun 2017 19:47:55 +0000 (04:47 +0900)]
netutils/websocket: check returning value of pthread_ funcion

After this commit, websocket will check pthread_ related function's
returning value.

Change-Id: Ia561cd9e9142afa2f9d7a2ef8ee1d4aecd236d76
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonet/tls: check function's return value
Junyeon LEE [Mon, 19 Jun 2017 19:47:32 +0000 (04:47 +0900)]
net/tls: check function's return value

Several functions did not check the input / return value in pk_wrap.c
and easy_tls.c files.

Change-Id: I3cb198c4b7db4947f9e253959e143446595f2311
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agoexamples/libcoap_server : trivial fixes for libcoap_server example
Jin-Seong Kim [Mon, 19 Jun 2017 04:44:40 +0000 (13:44 +0900)]
examples/libcoap_server : trivial fixes for libcoap_server example

This commit is trivial fixes for libcoap_server example
 - add log on hnd_put_time function when its progress has been succeed
 - delete un-supported DELETE callback function

Change-Id: I0f0a737f9e38064fe15eb40acae9829f24f6786e
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agoexamples/sensor_test: introduce ppd42ns sensor example application
Wonsang Ryou [Mon, 19 Jun 2017 06:25:27 +0000 (15:25 +0900)]
examples/sensor_test: introduce ppd42ns sensor example application

This commit introduces the example application for testing ppd42ns
dust sensor driver. The following configurations should be enabled
for this application.
  +CONFIG_SENSOR=y
  +CONFIG_SENSOR_PPD42NS=y
  +CONFIG_SENSOR_PPD42NS_GPIO_NUM=58
  +CONFIG_EXAMPLES_SENSOR_TEST=y
  +CONFIG_EXAMPLES_SENSOR_TEST_PPD42NS=y

You can test this application using 'sensor_ppd42ns' command in tash.

Change-Id: Ibf189af067d117977b5257ed6a5c9cc8a7e4d99d
Signed-off-by: Wonsang Ryou <wonsang.yoo@samsung.com>
7 years agodrivers/sensors: introduce common sensor APIs
Wonsang Ryou [Mon, 19 Jun 2017 05:55:37 +0000 (14:55 +0900)]
drivers/sensors: introduce common sensor APIs

This commit introduces common APIs' definition for sensor drivers.

The driver developers makes sensor drivers according to these common
sensor APIs' definition and the application developers can control
sensor devices using this APIs.

Change-Id: I7e52be1f9b3f5c141113b3d07d501f1021caec79
Signed-off-by: Wonsang Ryou <wonsang.yoo@samsung.com>
7 years agoexternal/wakaama: restore wakaama examples.
Junyeon LEE [Fri, 16 Jun 2017 04:35:39 +0000 (13:35 +0900)]
external/wakaama: restore wakaama examples.

This commit rollbacks wakaama examples for supporting DM framework.
Now that wakaama examples are nearly same with current eclipse/wakaama
opensource. The only differences with opensource are
  . Add protocol type to support and indicate TCP.
  . Add read_input_command_line() for parsing inputs.

Change-Id: I22e152e1d61941d4e36a75442fe54b1a058dc825
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonetutils/webclient: fix function comment
Jihun Ahn [Mon, 15 May 2017 02:30:39 +0000 (11:30 +0900)]
netutils/webclient: fix function comment

Currently, The name of this inline function is 'wget_parseheaders',
but in comments it was written as 'wget_parsestatus'.

This commit fix this function comment.

Change-Id: I66a15599f04ca7d5b592a13abaa1acc4c2a790f4
Signed-off-by: Jihun Ahn <jhun.ahn@samsung.com>
7 years agoexternal/wakaama: add dependency between dm and platform example.
Junyeon LEE [Fri, 16 Jun 2017 04:32:52 +0000 (13:32 +0900)]
external/wakaama: add dependency between dm and platform example.

This commit addes a positive and negative dependency in wakaama example.
Because DM framework and platform example can not be compatible.

Change-Id: Id19990f9764fde0cd36697c6f41242fd7b41ddd1
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonetutils/webclient: check the request argument
Jihun Ahn [Mon, 15 May 2017 04:53:19 +0000 (13:53 +0900)]
netutils/webclient: check the request argument

Do an initial check on the argument of request in client_send_request
function to avoid possible segmentation faults.

Change-Id: If6ac47c9f974451de1942b85e181aa719b61d547
Signed-off-by: Jihun Ahn <jhun.ahn@samsung.com>
7 years agonetutils/webclient: combine similar code from http_client_send_request
Jihun Ahn [Mon, 15 May 2017 04:42:23 +0000 (13:42 +0900)]
netutils/webclient: combine similar code from http_client_send_request

Two functions that is 'http_client_send_request' and
'http_client_send_request' are very similar code.
This commit combines similar codes from two functions.

Change-Id: I9112a58b03cce1de772f1d0d87a029f9e2739175
Signed-off-by: Jihun Ahn <jhun.ahn@samsung.com>
7 years agonetutils/webclient: remove errout statement
Jihun Ahn [Mon, 15 May 2017 04:18:58 +0000 (13:18 +0900)]
netutils/webclient: remove errout statement

This commit removes the 'errout' statement by changing the location of
the buffer allocation area.

Change-Id: I062f5a65f52c98fe0abd59adeb602921edfbdea2
Signed-off-by: Jihun Ahn <jhun.ahn@samsung.com>
7 years agonetutils/webclient: remove else routine
Jihun Ahn [Mon, 15 May 2017 04:16:14 +0000 (13:16 +0900)]
netutils/webclient: remove else routine

Currently, this codes unnecessary because in this situation,
certainty exiting in this function.

Change-Id: I6b018d94a85e9910ef83a130495ca6fb6daf305a
Signed-off-by: Jihun Ahn <jhun.ahn@samsung.com>
7 years agonetutils/webclient: fix location of argument check
Jihun Ahn [Mon, 15 May 2017 04:05:22 +0000 (13:05 +0900)]
netutils/webclient: fix location of argument check

This commit fixes check the argument field location.

Change-Id: I076de6721857cb4bbdcb4401f981794666ba7c78
Signed-off-by: Jihun Ahn <jhun.ahn@samsung.com>
7 years agonetutils/webclient: separate 'wget_base' according to TLS
Jihun Ahn [Mon, 15 May 2017 08:08:02 +0000 (17:08 +0900)]
netutils/webclient: separate 'wget_base' according to TLS

This function consists of a lot of predefined code which is
'CONFIG_NET_SECURITY_TLS'.
It makes understand source code too hard.
So, This commit separate 'wget_base' according to definition of TLS.

Change-Id: I93957a71d60349bc3656a7152f9280be6bb46abc
Signed-off-by: Jihun Ahn <jhun.ahn@samsung.com>
7 years agonetutils/webserver: add NULL pointer check after alloc buffer
Junyeon LEE [Wed, 14 Jun 2017 15:40:56 +0000 (00:40 +0900)]
netutils/webserver: add NULL pointer check after alloc buffer

This commit addes NULL pointer check after allocating buffer and
fixes two minor issues.
  . Null pointer 'dq->paths' is deallocated at http_query.c:231 by
    calling function 'free'
  . Return value 'return value of fputs(...)' of a function 'fputs'
    called at http_client.c:532 is not checked.
  . query array in "http_query.c" is able to make data overflow at
    http_divide_query_params()

Change-Id: Ie335d0a3b9dbcd5d674ef0066acf083b400b7d43
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonet/tls: add NULL pointer check after alloc buffer
Junyeon LEE [Wed, 14 Jun 2017 15:33:08 +0000 (00:33 +0900)]
net/tls: add NULL pointer check after alloc buffer

This commit addes NULL pointer check after allocating buffer and
fixes two minor issues.
  . sizeof(SEE_MAX_ENCRYPTED_KEY_SIZE) can be possible to initialize
    un-expected size.
  . Redundant comparison at "if (der_buf)" is always true.
  . Logit operator precedence in assignment can produce an unexpected
    result in pk_wrap.c : 620.

Change-Id: I27d37b220bc844345da15cc135cedad0d55841e4
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonetutils/webclient: add NULL pointer check after alloc buffer
Junyeon LEE [Wed, 14 Jun 2017 15:31:02 +0000 (00:31 +0900)]
netutils/webclient: add NULL pointer check after alloc buffer

This commit addes NULL pointer check routine in webclient after
allocating buffer.

Change-Id: I3e9f2fd6606d72f0b92f3f80a274d095a4b5b2c2
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agomtd Kconfig: Fix trivial typo
EunBong Song [Wed, 14 Jun 2017 03:59:49 +0000 (12:59 +0900)]
mtd Kconfig: Fix trivial typo

Change-Id: I19c9a08822f67abb0b144555b5da18eabfdc439f
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agoKconfig: Fix trivial bug of DOWNLOAD_IMAGE & SMARTFS_IMAGE
EunBong Song [Wed, 14 Jun 2017 00:40:54 +0000 (09:40 +0900)]
Kconfig: Fix trivial bug of DOWNLOAD_IMAGE & SMARTFS_IMAGE

DOWNLOAD_IMAGE & SMARTFS_IMAGE do not have submenu. So these should be
config not a menuconfig.

Change-Id: Ib6db3e755fa987f6643ee645a6d4ca3e393c2479
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agoexamples/lwm2m_test: fix a compilation error on prv_status_to_string
Junyeon LEE [Mon, 12 Jun 2017 15:19:17 +0000 (00:19 +0900)]
examples/lwm2m_test: fix a compilation error on prv_status_to_string

This commit fixes a compilation error on lwm2m_test example.

  commandline.c: In function 'prv_status_to_string':
  commandline.c:404:37: error: expected expression before 'return'
     #define CODE_TO_STRING(X)   case X:(return #X)
                                     ^
  commandline.c:409:3: note: in expansion of macro 'CODE_TO_STRING'
     CODE_TO_STRING(COAP_NO_ERROR);

Change-Id: I1c7afb3d07ca1e09545f5eb92167641f7d6e839a
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonet/tls: easy_tls api supports DTLS connection
Junyeon LEE [Thu, 8 Jun 2017 16:50:57 +0000 (01:50 +0900)]
net/tls: easy_tls api supports DTLS connection

Now that easy tls apis are supporting dtls connection.

Change-Id: Ia213df5b3e64c8def3a6c023188be322a3c2215b
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agolibc/netdb : nuttx patch, fix time info in lib_dnscache.c
Jin-Seong Kim [Fri, 9 Jun 2017 02:15:27 +0000 (11:15 +0900)]
libc/netdb : nuttx patch, fix time info in lib_dnscache.c

This commit is patch to fix time info in lib_dnscache.c
 - fix wrong usage of time function
 - nuttx patch information is as follows :
 - refer "fix time info in lib_dnscache.c" in nuttx main branch

Change-Id: Ife4350ef2c752252f9e34c9aa1b97af14d6bf7f1
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agoexternal/wakaama: clean up the wakaama build tree
EunBong Song [Tue, 11 Jul 2017 01:46:09 +0000 (10:46 +0900)]
external/wakaama: clean up the wakaama build tree

This commit seperates dependency between lwm2m core library and
device management application(DM app).

1. Do not build external wakaama examples without device management
   configuration. Now that under wakaama/examples/ source codes are
   only for DM framework.

2. Now that user can build only wakaama core library.

Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agoexamples/dnsclient : minor patch to enhance stability on example
Jin-Seong Kim [Thu, 8 Jun 2017 10:08:52 +0000 (19:08 +0900)]
examples/dnsclient : minor patch to enhance stability on example

This commit is minor patch to enhance stability on example
 - add checking routine for the length of hostname
 - changed to TASH_COMMAND_SYNC command

Change-Id: I61ad9587298d5139aa8fbf3ed086afaf5d77adac
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agoexamples/lwm2m_test: introduce lwm2m test examples
Junyeon LEE [Thu, 8 Jun 2017 16:52:10 +0000 (01:52 +0900)]
examples/lwm2m_test: introduce lwm2m test examples

This commit is to introduce lwm2m test examples which is based on wakaama.
Restriction: lwm2m server and client examples can not build at a time.

Change-Id: Ic24926d611695c9c387af776006aa3ab934ebd00
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonetutils/mqtt: allow concurrent sub,unsub,pub on same mqtt instance
Wonsang Ryou [Thu, 1 Jun 2017 06:23:29 +0000 (15:23 +0900)]
netutils/mqtt: allow concurrent sub,unsub,pub on same mqtt instance

This patch allows users to operate subscribe, unsubscribe and publish
concurrently on same mqtt client instance. The subscribe, unsubscribe
and publish operations had been able to be operated only when there is
no other operation.

Change-Id: I0a24b7f6a882e190874163103c1b81de8283a192
Signed-off-by: Wonsang Ryou <wonsang.yoo@samsung.com>
7 years agoexamples/libcoap : trivial patch, remove not supported commands in usage
Jin-Seong Kim [Wed, 7 Jun 2017 00:54:58 +0000 (09:54 +0900)]
examples/libcoap : trivial patch, remove not supported commands in usage

This commit is trivial patch, remove not supported commands in usage

Change-Id: I7c581502afa62dd8511ae47228876089b4402bb9
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agoexamples/tls: fixes uninitialized timer context error
Junyeon LEE [Fri, 2 Jun 2017 07:03:25 +0000 (16:03 +0900)]
examples/tls: fixes uninitialized timer context error

This commit fixes two critical bugs in tls applications.

  . Uninitialized timer context error can occur when user
    tried to connect dtls in tls-application.
  . Unallocates mbedtls_timing_delay_context was used and
    it can make data abort in ssl_set_timer()

Change-Id: I65f061309b9b1e0e346c0bbb003f871e96f46499
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agowakama Kconfig: change default from n to y
EunBong Song [Sat, 3 Jun 2017 07:19:53 +0000 (16:19 +0900)]
wakama Kconfig: change default from n to y

LWM2M_WAKAAMA does not need to be default y.

Change-Id: Ib9e3eceb24406133d1fd77fa5626708243abc235
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agoexamples/websocket: fixes buffer overflow
Junyeon LEE [Mon, 5 Jun 2017 11:36:46 +0000 (20:36 +0900)]
examples/websocket: fixes buffer overflow

This commit fixes websocket client buffer overflow problem.
When user set the buffer size to 16, sprint() in websocket client
application will copy the test data more than 16 and it can make
buffer overflow.

Change-Id: Idd3084354be2a67f8d3ac092edf4258c198c94d9
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agoexamples/libcoap_client : bug fix, deinitializes global variables
Jin-Seong Kim [Fri, 2 Jun 2017 09:06:49 +0000 (18:06 +0900)]
examples/libcoap_client : bug fix, deinitializes global variables

This commit is patch to deinitialize global variables

Change-Id: I1dd45b79d1a76fb0a0dcba86d792c17437cc6334
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agoMerge pull request #267 from jeongarmy/master
sunghan-chang [Tue, 11 Jul 2017 05:49:53 +0000 (14:49 +0900)]
Merge pull request #267 from jeongarmy/master

Changes format of function for clean up in tc macros and add new tc macro

7 years agoMerge pull request #268 from jeongchanKim/kernel_heapinfo
sunghan-chang [Tue, 11 Jul 2017 05:49:31 +0000 (14:49 +0900)]
Merge pull request #268 from jeongchanKim/kernel_heapinfo

Kernel heapinfo

7 years agoMerge pull request #250 from EunBongSong/ds-dev2
sunghan-chang [Tue, 11 Jul 2017 05:48:14 +0000 (14:48 +0900)]
Merge pull request #250 from EunBongSong/ds-dev2

Ds dev2

7 years agoMerge branch 'master' into ds-dev2
EunBong Song [Tue, 11 Jul 2017 02:27:00 +0000 (11:27 +0900)]
Merge branch 'master' into ds-dev2

7 years agoexamples/libcoap_test : separates coap-client / server examples
Jin-Seong Kim [Fri, 2 Jun 2017 00:16:52 +0000 (09:16 +0900)]
examples/libcoap_test : separates coap-client / server examples

This commit is patch to separate libcoap server/client examples
 - client is operated as pthread
 - server is set to TASH_ASYNC_CMD
 - instead of getopt, use internal function on coap-server example

Change-Id: I7b6c07a37bdf38c7c4ff98047f028ebbff66fa23
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agoChange negative values to defined in heapinfo
jc_.kim [Mon, 10 Jul 2017 04:21:33 +0000 (13:21 +0900)]
Change negative values to defined in heapinfo

-1 to HEAPINFO_INT, -2 to HEAPINFO_STACK, -3 to HEAPINFO_NONSCHED

7 years agoModify heapinfo for excluding child stacksize from parent heapsize
jc_.kim [Fri, 7 Jul 2017 06:00:21 +0000 (15:00 +0900)]
Modify heapinfo for excluding child stacksize from parent heapsize

7 years agoexternal/wakaama : fixes memory leakage
Seongeun Choi [Wed, 31 May 2017 13:58:41 +0000 (22:58 +0900)]
external/wakaama : fixes memory leakage

This patch fixes memory leakage issues in the lwm2m_data_parse(),
registration_handleRequest(), prv_add(), prv_remove(),
and prv_create_client() functions.

Change-Id: I4391512a4c092fb784538c00cd4c6a5f5219f261
Signed-off-by: Seongeun Choi <seongeun.choi@samsung.com>
7 years agonetutils/libcoap : bug fix, memory leakage on coap_delete_attr
Jin-Seong Kim [Wed, 31 May 2017 04:00:24 +0000 (13:00 +0900)]
netutils/libcoap : bug fix, memory leakage on coap_delete_attr

This commit is patch to fix memory leakage on coap_delete_attr
 - CFLAG should be WITH_POSIX not POSIX to free attr

Change-Id: I5d4280bc25df7893108ce6c54ae0518ec0fe4b4b
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agoexamples/coap-server : add flag to prevent duplicate run of coap-server
Jin-Seong Kim [Wed, 31 May 2017 02:09:33 +0000 (11:09 +0900)]
examples/coap-server : add flag to prevent duplicate run of coap-server

This commit is patch to add flag to prevent duplicate run of coap-server

Change-Id: I8259a8e0a2708785d53870b42a2b971dcc4baf27
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agonetutils/websocket: organizing code
bossjisu [Wed, 31 May 2017 14:02:15 +0000 (07:02 -0700)]
netutils/websocket: organizing code

1. internal function name is changed:
   websocket_server_start() -> websocket_server_authenticate()
2. websocket_socket_free() is moved to common function area.
3. added comment about the difference between websocket_server_open()
and websocket_server_init()

Change-Id: I5b4e3e445ea2bafcac920955396fd54e51f87a54
Signed-off-by: bossjisu <jisuu.kim@samsung.com>
7 years agonetutils/mdns : fix build error without responder configuration
Jin-Seong Kim [Mon, 29 May 2017 10:14:09 +0000 (19:14 +0900)]
netutils/mdns : fix build error without responder configuration

This commit is patch to fix build error without responder configuration
 - service paramter is used for mdns responsder

Change-Id: Ie5e2a7414ab4cc05cb03e76422c375a4e48e66c0
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agonetutils/websocket: organizing code
bossjisu [Tue, 30 May 2017 11:12:46 +0000 (04:12 -0700)]
netutils/websocket: organizing code

1. Deleted Unused wqueue function code
2. Added guide line for websocket handler timeout value. It is not supposed
to be 0 becaust it makes busy waiting.
3. Added definition on checking a NULL parameter
4. Changed Inappropriate names:
   websocket_ping_timer() -> websocket_ping_counter()
   websocket_make_block() -> websocket_config_socket()
   WEBSOCKET_SERVER_CHECK_INTERVAL -> WEBSOCKET_ACCEPT_TIMEOUT

Change-Id: I742f5f0a3c6b50252d7a38fe8a10e927b341837a
Signed-off-by: bossjisu <jisuu.kim@samsung.com>
7 years agonetutils/webclient: check webclient example running status
Junyeon LEE [Mon, 29 May 2017 21:17:57 +0000 (06:17 +0900)]
netutils/webclient: check webclient example running status

This commit addes global value for checking webclieng running status.
If webclient example runs twice at a time, global values like g_https
and g_async can be destroyed by latter webclient app.

Change-Id: I49644810de070c09d10e5d2c4bad402d35e5e505
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agoexternal/wakaama: add context free.
Junyeon LEE [Mon, 29 May 2017 09:48:58 +0000 (18:48 +0900)]
external/wakaama: add context free.

This commit is to add tls context free routine in examples.

Change-Id: I8f4aad9b130cd0a0ff1171e6d1c76a032ba78829
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agoexamples/coap-server : trivial patch on handle signal function
Jin-Seong Kim [Mon, 29 May 2017 07:51:59 +0000 (16:51 +0900)]
examples/coap-server : trivial patch on handle signal function

This commit is trivial patch on handle signal function
 - handle_sigint function name can be used by other applications
 - it can causes linking error after compiling so, fix it to static

Change-Id: I0d220677c33cdbe65b9913896314bb571dabd61a
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agoexternal/wakaama : patch to add close socket for abnormal exit case
Jin-Seong Kim [Mon, 29 May 2017 01:43:43 +0000 (10:43 +0900)]
external/wakaama : patch to add close socket for abnormal exit case

This commit is patch exit routine to close socket for abnormal exit
 - lwm2mclient and server examples has no routine to close socket
   when some abnormal exit case
 - it can cause failure of rebinding socket since tizenRT doesn't
   support gracefully closing sockets for exit processes

Change-Id: I74c22abdb92bb7c85e883573b93c024522b0e00a
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agoexternal/wakaama : separate coap_serialize_message function for udp/tcp
Jin-Seong Kim [Fri, 26 May 2017 10:11:40 +0000 (19:11 +0900)]
external/wakaama : separate coap_serialize_message function for udp/tcp

This commit is to separate coap_serialize_message function for udp/tcp
 - to maintain wakaama legacy code, separate tcp/udp api in er-coap

Change-Id: I029aeee28c0cde3981911d3c4e62c4bd3d14633c
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agonetutils/dhcpc : do not send decline message to same dhcp server
Jin-Seong Kim [Thu, 25 May 2017 08:30:55 +0000 (17:30 +0900)]
netutils/dhcpc : do not send decline message to same dhcp server

This commit is bug fix to prevent send decline message
 - dhcp declient message is used to announce duplicated
   assigned IP address in a network
 - dhcp client doesn't have routine to check duplicate IP
   via ARP, so no need to send decline message to same server

Change-Id: Iae6036e064d767159fa6d1b6a10f95fcaa3c317f
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agoexamples/http: support option parameters
EunBong Song [Thu, 25 May 2017 10:40:58 +0000 (19:40 +0900)]
examples/http: support option parameters

Now that webclient supports option parameters input.

* Webclient usage.
   . webclient GET http://127.0.0.1/ async=1
   . webclient PUT https://127.0.0.1/ async=1 entity=senddata

* Options
   . async=1          : Enable asynchronous mode (default is synchronous)
   . chunked=1        : Enable chunked encoding (default is disabled)
   . entity=DATA      : Input entity data (default is NULL)
   . test_entity=SIZE : Input test entity dummy data (default is 0)

Change-Id: I074a74507c72813621617731cd9215071cb7b461
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agoexamples/dnsclient_test : remove log of official hostname
Jin-Seong Kim [Thu, 25 May 2017 03:40:10 +0000 (12:40 +0900)]
examples/dnsclient_test : remove log of official hostname

This commit is to remove log of official hostname
 - gethostbyname API doesn't return official hostname and alias
 - so to prevent user confusion, remove log

Change-Id: I2b3670debf2bc8edb76a5916da3ac64786c342b9
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agoexternal/wakaama : modify dependency for wakaama app. and DM
Seongeun Choi [Mon, 22 May 2017 01:10:53 +0000 (10:10 +0900)]
external/wakaama : modify dependency for wakaama app. and DM

Currently, for building wakama, DM should be enabled.
This commit separates wakama and DM fraomework.

Change-Id: I68bf11cdfd903f9e4941e9a5da3be35cefc653f5
Signed-off-by: Seongeun Choi <seongeun.choi@samsung.com>
7 years agofixup! netutils/webclient: duplicates memory allocation
Jin-Seong Kim [Tue, 23 May 2017 09:52:09 +0000 (18:52 +0900)]
fixup! netutils/webclient: duplicates memory allocation

Change-Id: I42465d1adcfc5bf3b15d8a917050668f0b172161
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agonetutils/dhcpd : trivial patch, add debug log on dhcp discover
Jin-Seong Kim [Wed, 24 May 2017 02:12:07 +0000 (11:12 +0900)]
netutils/dhcpd : trivial patch, add debug log on dhcp discover

This commit is trivial patch, add debug log on dhcp discover
 - fix static analysis result, UNCHECKED_FUNC_RES.LIB.STRICT

Change-Id: If1b5673cafc6782f1cf6f6e477ae4d0104120463
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agoexternal/wakaama : initialize main loop status
Seongeun Choi [Tue, 23 May 2017 06:59:20 +0000 (15:59 +0900)]
external/wakaama : initialize main loop status

This commit fixes an issue that the applications can not execute again
after the first execution.

Change-Id: Ic4a4a32918aa64a0c1c89502520d480be97231c6
Signed-off-by: Seongeun Choi <seongeun.choi@samsung.com>
7 years agonetutils/webclient: duplicates memory allocation
Junyeon LEE [Tue, 23 May 2017 10:46:54 +0000 (19:46 +0900)]
netutils/webclient: duplicates memory allocation

This commit fixes memory duplicated allocation problem in
webclient. If tls handshake retried, response buffer would be
able to be initialized double or triple times but release once.
Now that wget_base checkes buffer existance before allocating
a response buffer

Change-Id: I190827dd243df7d5be83170c904d23c40e036955
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agoexternal/wakaama : fix bug parsing int64_t type
Seongeun Choi [Mon, 22 May 2017 08:28:58 +0000 (17:28 +0900)]
external/wakaama : fix bug parsing int64_t type

This commit fixes an unresolved wakaama server issue.
When executing to create client resource, returns error
COAP_400_BAD_REQUEST. To solve this problem, It's necessary to change
the input data type to 64 bits.

Change-Id: I5715093293c23b563e119641399f4b0a1fe97613
Signed-off-by: Seongeun Choi <seongeun.choi@samsung.com>
7 years agoexample/libcoap_test : introduce libcoap 4.1.1 test examples
Jin-Seong Kim [Mon, 15 May 2017 08:14:48 +0000 (17:14 +0900)]
example/libcoap_test : introduce libcoap 4.1.1 test examples

This commit is to introduce libcoap 4.1.1 test examples
 - server / client examples

Change-Id: Iac1df3cc9d9e4ba1c7b8d283738abfcb0c364487
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agonetutils/libcoap : patch for coap_transaction_id function
Jin-Seong Kim [Mon, 15 May 2017 07:50:04 +0000 (16:50 +0900)]
netutils/libcoap : patch for coap_transaction_id function

This commit is patch to coap_transaction_id function
problem
 - coap_hash function uses structure addr.sa to create tid
 - when coap message is received,
   tid, which is in received coap message, is used to
   comparing sender's tid
 - unmatched case occurs, when addr.sa is used to create tid
 - in this case, sender cannot find coap response message
   which has same tid of sender so infinite retransmission
   happens on application
 solution
 - uses addr and port value to create tid similar to IPv6

Change-Id: I1665577394d772bacb0d923dfeb7094db99e4a3b
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agonetutils/libcoap : introduce libcoap 4.1.1
Jin-Seong Kim [Mon, 15 May 2017 07:16:08 +0000 (16:16 +0900)]
netutils/libcoap : introduce libcoap 4.1.1

This commit is to introduce libcoap 4.1.1
 source path - apps/netutils/libcoap
 header path - apps/include/netutils/libcoap

Change-Id: I6f3d4e8ec163813e68fe539a6fb8ebc288ab8b00
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agoexamples/tls: fix certificates retrieval from SSS
Gregory Lemercier [Tue, 2 May 2017 08:57:49 +0000 (10:57 +0200)]
examples/tls: fix certificates retrieval from SSS

This patch fixes the way the CA and device certificates are retrieved
from the SSS. Before a common ASN1 tag value was searched with 'strstr',
which was failing to properly split up the certificates. Instead we read
the length value of the ASN1 sequence using the field following the
ASN1 tag, which gives us the offset of the next certificate in the chain.

Change-Id: I39c2cc40cd8be527a039c2922b21b97b9ea4a7f2
Signed-off-by: Gregory Lemercier <g.lemercier@samsung.com>
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agofixup! s5j: add device driver for mct
Heesub Shin [Fri, 12 May 2017 08:44:31 +0000 (17:44 +0900)]
fixup! s5j: add device driver for mct

Change-Id: Ic0be7d19a5263ef760e82ad0d460e26cbb691e78

7 years agofixup! examples: add a sample application for showing timer usage
Heesub Shin [Fri, 12 May 2017 08:43:55 +0000 (17:43 +0900)]
fixup! examples: add a sample application for showing timer usage

Change-Id: I3f0a81a3c59f1d11fb7212e2b4c1b8d689cbd7b7

7 years agoAdd .travis.yml for CI env
daesung [Thu, 29 Jun 2017 05:27:59 +0000 (22:27 -0700)]
Add .travis.yml for CI env

7 years agoChanges format of function for clean up in tc macros and add new tc macro
Ahreum Jeong [Wed, 28 Jun 2017 06:24:15 +0000 (15:24 +0900)]
Changes format of function for clean up in tc macros and add new tc macro
Remove error parameter of clean up functions in tc macros because this is not useful
Leave a function which checks whether values are equal and rename it to TC_ASSERT_EQ_ERROR_CLEANUP to show error type

7 years agoMerge pull request #262 from sunghan-chang/master
sangwon03 [Tue, 11 Jul 2017 01:13:59 +0000 (10:13 +0900)]
Merge pull request #262 from sunghan-chang/master

refactoring unnecessary codes

7 years agoMerge pull request #234 from shivgarg/master
sunghan-chang [Tue, 11 Jul 2017 01:06:12 +0000 (10:06 +0900)]
Merge pull request #234 from shivgarg/master

Changes in arastorage

7 years agoMerge pull request #261 from kimusan/master
sunghan-chang [Tue, 11 Jul 2017 01:04:15 +0000 (10:04 +0900)]
Merge pull request #261 from kimusan/master

Fixed header license for wifi api/app

7 years agoMerge pull request #265 from jeongarmy/environ
sunghan-chang [Tue, 11 Jul 2017 00:54:58 +0000 (09:54 +0900)]
Merge pull request #265 from jeongarmy/environ

Add conditionals of CONFIG_DISABLE_ENVIRON to functions which have dependency on it

7 years agoMerge pull request #264 from jeongarmy/tc_fslibc
sunghan-chang [Tue, 11 Jul 2017 00:54:20 +0000 (09:54 +0900)]
Merge pull request #264 from jeongarmy/tc_fslibc

Expand fs testcases, libc stdio, dirent, and vfs

7 years agoFix header license for slsiwifi app
Kim Schulz [Fri, 7 Jul 2017 07:21:28 +0000 (09:21 +0200)]
Fix header license for slsiwifi app

The license in the header of the files were not the right one or messed up.
This patch fixes the licens and align it for all files

7 years agofix header license for wifi driver
Kim Schulz [Fri, 7 Jul 2017 08:41:31 +0000 (10:41 +0200)]
fix header license for wifi driver

The license in the header of the files were not the right one or messed up.
This patch fixes the licens and align it for all files

7 years agofix header license for wifi api
Kim Schulz [Fri, 7 Jul 2017 07:27:54 +0000 (09:27 +0200)]
fix header license for wifi api

 The license in the header of the files were not the right one or messed up.
 This patch fixes the licens and align it for all files

7 years agoFix header license for slsiwifi app
Kim Schulz [Fri, 7 Jul 2017 07:21:28 +0000 (09:21 +0200)]
Fix header license for slsiwifi app

The license in the header of the files were not the right one or messed up.
This patch fixes the licens and align it for all files

7 years agoAdd conditionals of CONFIG_DISABLE_ENVIRON to functions which have dependency on it
Ahreum Jeong [Wed, 28 Jun 2017 00:47:16 +0000 (09:47 +0900)]
Add conditionals of CONFIG_DISABLE_ENVIRON to functions which have dependency on it

7 years agoExpand fs testcases, libc stdio, dirent, and vfs
Ahreum Jeong [Mon, 26 Jun 2017 11:30:56 +0000 (20:30 +0900)]
Expand fs testcases, libc stdio, dirent, and vfs

7 years agofix indentation on pthread
sunghan [Tue, 27 Jun 2017 10:47:24 +0000 (19:47 +0900)]
fix indentation on pthread

7 years agoremove unnecessary app, prun and ramtron
sunghan [Tue, 20 Jun 2017 10:03:25 +0000 (19:03 +0900)]
remove unnecessary app, prun and ramtron

7 years agoMerge pull request #260 from jeongchanKim/kernel_tc
sunghan-chang [Tue, 4 Jul 2017 05:37:25 +0000 (14:37 +0900)]
Merge pull request #260 from jeongchanKim/kernel_tc

Add omitted select option in Kernel TC Kconfig for LIBC_MQUEUE TC

7 years agoAdd omitted select option in Kernel TC Kconfig for LIBC_MQUEUE TC
jc_.kim [Tue, 4 Jul 2017 05:14:19 +0000 (14:14 +0900)]
Add omitted select option in Kernel TC Kconfig for LIBC_MQUEUE TC

7 years agoMerge pull request #259 from jeongchanKim/kernel_doxygen
sunghan-chang [Tue, 4 Jul 2017 02:50:01 +0000 (11:50 +0900)]
Merge pull request #259 from jeongchanKim/kernel_doxygen

Modify the indent and coding rule for doxygen

7 years agoModify the indent and coding rule for doxygen
jc_.kim [Mon, 3 Jul 2017 11:17:10 +0000 (20:17 +0900)]
Modify the indent and coding rule for doxygen