netutils/libcoap : fixes, including path of libcoap headers
authorJin-Seong Kim <jseong82.kim@samsung.com>
Mon, 10 Jul 2017 02:37:59 +0000 (11:37 +0900)
committerEunBong Song <eunb.song@samsung.com>
Wed, 30 Aug 2017 04:15:44 +0000 (21:15 -0700)
This commit is to fix including header path
 - header including path is fixed to absoulte path
   to give same experiences to developers as other netutil libraries

Change-Id: Idf5aa0c5e4684e9d206f8018e4532949eb410ed1
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
34 files changed:
apps/examples/libcoap_client/Makefile
apps/examples/libcoap_client/libcoap-client.c
apps/examples/libcoap_server/Makefile
apps/examples/libcoap_server/libcoap-server.c
apps/include/netutils/libcoap/address.h
apps/include/netutils/libcoap/async.h
apps/include/netutils/libcoap/block.h
apps/include/netutils/libcoap/coap.h
apps/include/netutils/libcoap/coap_time.h
apps/include/netutils/libcoap/debug.h
apps/include/netutils/libcoap/encode.h
apps/include/netutils/libcoap/hashkey.h
apps/include/netutils/libcoap/net.h
apps/include/netutils/libcoap/option.h
apps/include/netutils/libcoap/pdu.h
apps/include/netutils/libcoap/prng.h
apps/include/netutils/libcoap/resource.h
apps/include/netutils/libcoap/subscribe.h
apps/include/netutils/libcoap/t_list.h
apps/include/netutils/libcoap/uri.h
apps/netutils/libcoap/Makefile
apps/netutils/libcoap/async.c
apps/netutils/libcoap/block.c
apps/netutils/libcoap/coap_list.c
apps/netutils/libcoap/debug.c
apps/netutils/libcoap/encode.c
apps/netutils/libcoap/hashkey.c
apps/netutils/libcoap/net.c
apps/netutils/libcoap/option.c
apps/netutils/libcoap/pdu.c
apps/netutils/libcoap/resource.c
apps/netutils/libcoap/str.c
apps/netutils/libcoap/subscribe.c
apps/netutils/libcoap/uri.c

index 45a2613..96405c5 100644 (file)
@@ -43,7 +43,7 @@ CLIENT_APPNAME = libcoap-client
 CLIENT_FUNCNAME = coap_client_test_main
 THREADEXEC = TASH_EXECMD_SYNC
 
-# mqtt test example
+# libcoap-client test example
 
 ASRCS =
 CSRCS =
@@ -63,7 +63,7 @@ CFLAGS += -D__TINYARA__
 ifeq ($(CONFIG_NETUTILS_LIBCOAP_DEBUG),n)
 CFLAGS += -DNDEBUG
 endif
-CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)$(DELIM)include$(DELIM)netutils$(DELIM)libcoap}
+#CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)$(DELIM)include$(DELIM)netutils$(DELIM)libcoap}
 
 ifneq ($(CONFIG_BUILD_KERNEL),y)
   OBJS += $(MAINOBJ)
index 05b05c2..59e4171 100644 (file)
@@ -21,7 +21,7 @@
 #include <arpa/inet.h>
 #include <netdb.h>
 
-#include "coap.h"
+#include <apps/netutils/libcoap/coap.h>
 
 #ifndef NI_MAXHOST
 #define NI_MAXHOST 1025
index 232fc61..cca084d 100644 (file)
@@ -43,7 +43,7 @@ SERVER_APPNAME = libcoap-server
 SERVER_FUNCNAME = coap_server_test_main
 THREADEXEC = TASH_EXECMD_ASYNC
 
-# mqtt test example
+# libcoap-server test example
 
 ASRCS =
 CSRCS =
@@ -63,7 +63,7 @@ CFLAGS += -D__TINYARA__
 ifeq ($(CONFIG_NETUTILS_LIBCOAP_DEBUG),n)
 CFLAGS += -DNDEBUG
 endif
-CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)$(DELIM)include$(DELIM)netutils$(DELIM)libcoap}
+#CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)$(DELIM)include$(DELIM)netutils$(DELIM)libcoap}
 
 ifneq ($(CONFIG_BUILD_KERNEL),y)
   OBJS += $(MAINOBJ)
index 40e7f53..7c9737a 100644 (file)
@@ -25,7 +25,7 @@
 #include <errno.h>
 #include <signal.h>
 
-#include "coap.h"
+#include <apps/netutils/libcoap/coap.h>
 
 #define COAP_RESOURCE_CHECK_TIME 2
 
index bfabf81..e2cf172 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef _COAP_ADDRESS_H_
 #define _COAP_ADDRESS_H_
 
-#include "config.h"
+#include <apps/netutils/libcoap/config.h>
 
 #ifdef HAVE_ASSERT_H
 #include <assert.h>
index 25892d8..7d1d443 100644 (file)
@@ -14,8 +14,8 @@
 #ifndef _COAP_ASYNC_H_
 #define _COAP_ASYNC_H_
 
-#include "config.h"
-#include "net.h"
+#include <apps/netutils/libcoap/config.h>
+#include <apps/netutils/libcoap/net.h>
 
 #ifndef WITHOUT_ASYNC
 
index eb58e8e..d9f4098 100644 (file)
@@ -9,9 +9,9 @@
 #ifndef _COAP_BLOCK_H_
 #define _COAP_BLOCK_H_
 
-#include "option.h"
-#include "encode.h"
-#include "pdu.h"
+#include <apps/netutils/libcoap/option.h>
+#include <apps/netutils/libcoap/encode.h>
+#include <apps/netutils/libcoap/pdu.h>
 
 /**
  * @defgroup block Block Transfer
index e3c7128..f417dae 100644 (file)
 extern "C" {
 #endif
 
-#include "config.h"
-#include "debug.h"
-#include "mem.h"
-#include "coap_list.h"
-#include "pdu.h"
-#include "option.h"
-#include "net.h"
-#include "encode.h"
-#include "str.h"
-#include "uri.h"
-#include "async.h"
-#include "resource.h"
-#include "subscribe.h"
-#include "block.h"
+#include <apps/netutils/libcoap/config.h>
+#include <apps/netutils/libcoap/debug.h>
+#include <apps/netutils/libcoap/mem.h>
+#include <apps/netutils/libcoap/coap_list.h>
+#include <apps/netutils/libcoap/pdu.h>
+#include <apps/netutils/libcoap/option.h>
+#include <apps/netutils/libcoap/net.h>
+#include <apps/netutils/libcoap/encode.h>
+#include <apps/netutils/libcoap/str.h>
+#include <apps/netutils/libcoap/uri.h>
+#include <apps/netutils/libcoap/async.h>
+#include <apps/netutils/libcoap/resource.h>
+#include <apps/netutils/libcoap/subscribe.h>
+#include <apps/netutils/libcoap/block.h>
 
 #ifdef __cplusplus
 }
index b352979..694be10 100644 (file)
@@ -21,7 +21,7 @@
 extern "C" {
 #endif
 
-#include "config.h"
+#include <apps/netutils/libcoap/config.h>
 
 /**
  * @defgroup clock Clock Handling
index 593f867..6a24633 100644 (file)
@@ -9,7 +9,7 @@
 #ifndef _COAP_DEBUG_H_
 #define _COAP_DEBUG_H_
 
-#include "config.h"
+#include <apps/netutils/libcoap/config.h>
 
 #ifndef COAP_DEBUG_FD
 #define COAP_DEBUG_FD stdout
@@ -54,7 +54,7 @@ void coap_log_impl(coap_log_t level, const char *format, ...);
 #define warn(...) coap_log(LOG_WARNING, __VA_ARGS__)
 #define debug(...) coap_log(LOG_DEBUG, __VA_ARGS__)
 
-#include "pdu.h"
+#include <apps/netutils/libcoap/pdu.h>
 void coap_show_pdu(const coap_pdu_t *);
 
 struct coap_address_t;
index f5b3ac0..c915dba 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <tinyara/config.h>
 
-#ifdef __TINYARA__
+#if defined (__TINYARA__)
 #include <string.h>
 #else
 #if (BSD >= 199103) || defined(WITH_CONTIKI)
index bb68fd3..5d29f02 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef _COAP_HASHKEY_H_
 #define _COAP_HASHKEY_H_
 
-#include "str.h"
+#include <apps/netutils/libcoap/str.h>
 
 typedef unsigned char coap_key_t[4];
 
index 61f8ba8..a271c56 100644 (file)
@@ -13,7 +13,7 @@
 extern "C" {
 #endif
 
-#include "config.h"
+#include <apps/netutils/libcoap/config.h>
 
 #ifdef HAVE_ASSERT_H
 #include <assert.h>
@@ -40,11 +40,11 @@ extern "C" {
 #include <net/lwip/ipv4/ip_addr.h>
 #endif
 
-#include "option.h"
-#include "address.h"
-#include "prng.h"
-#include "pdu.h"
-#include "coap_time.h"
+#include <apps/netutils/libcoap/option.h>
+#include <apps/netutils/libcoap/address.h>
+#include <apps/netutils/libcoap/prng.h>
+#include <apps/netutils/libcoap/pdu.h>
+#include <apps/netutils/libcoap/coap_time.h>
 
 struct coap_queue_t;
 
index d4cf80d..84a2f90 100644 (file)
@@ -15,8 +15,8 @@
 #ifndef _OPTION_H_
 #define _OPTION_H_
 
-#include "bits.h"
-#include "pdu.h"
+#include <apps/netutils/libcoap/bits.h>
+#include <apps/netutils/libcoap/pdu.h>
 
 /**
  * Use byte-oriented access methods here because sliding a complex
index fe8eadf..5a94536 100644 (file)
@@ -9,9 +9,9 @@
 #ifndef _PDU_H_
 #define _PDU_H_
 
-#include "config.h"
-#include "coap_list.h"
-#include "uri.h"
+#include <apps/netutils/libcoap/config.h>
+#include <apps/netutils/libcoap/coap_list.h>
+#include <apps/netutils/libcoap/uri.h>
 
 #ifdef WITH_LWIP
 #include <net/lwip/pbuf.h>
index 1e303c6..89009ae 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef _COAP_PRNG_H_
 #define _COAP_PRNG_H_
 
-#include "config.h"
+#include <apps/netutils/libcoap/config.h>
 
 /**
  * @defgroup prng Pseudo Random Numbers
index 14f46c3..31ae6d5 100644 (file)
@@ -14,8 +14,8 @@
 #ifndef _COAP_RESOURCE_H_
 #define _COAP_RESOURCE_H_
 
-#include "config.h"
-#include "t_list.h"
+#include <apps/netutils/libcoap/config.h>
+#include <apps/netutils/libcoap/t_list.h>
 
 #if defined(HAVE_ASSERT_H) && !defined(assert)
 #include <assert.h>
 
 #ifndef WITH_CONTIKI
 #ifdef COAP_RESOURCES_NOHASH
-#include "utlist.h"
+#include <apps/netutils/libcoap/utlist.h>
 #else
-#include "uthash.h"
+#include <apps/netutils/libcoap/uthash.h>
 #endif
 #else                                                  /* WITH_CONTIKI */
 #endif                                                 /* WITH_CONTIKI */
-#include "hashkey.h"
-#include "async.h"
-#include "str.h"
-#include "pdu.h"
-#include "net.h"
-#include "subscribe.h"
+#include <apps/netutils/libcoap/hashkey.h>
+#include <apps/netutils/libcoap/async.h>
+#include <apps/netutils/libcoap/str.h>
+#include <apps/netutils/libcoap/pdu.h>
+#include <apps/netutils/libcoap/net.h>
+#include <apps/netutils/libcoap/subscribe.h>
 
 /** Definition of message handler function (@sa coap_resource_t). */
 typedef void (*coap_method_handler_t)
index 19166c4..f1df5fb 100644 (file)
@@ -10,8 +10,8 @@
 #ifndef _COAP_SUBSCRIBE_H_
 #define _COAP_SUBSCRIBE_H_
 
-#include "config.h"
-#include "address.h"
+#include <apps/netutils/libcoap/config.h>
+#include <apps/netutils/libcoap/address.h>
 
 /**
  * @defgroup observe Resource observation
index af0e35f..d1d90ee 100644 (file)
@@ -140,7 +140,7 @@ static inline void *list_item_next(void *item)
 }
 
 #else                                                  /* WITH_CONTIKI */
-#include "list.h"
+#include <apps/netutils/libcoap/list.h>
 #endif                                                 /* WITH_CONTIKI */
 
 #endif                                                 /* _DTLS_LIST_H_ */
index 264a216..e0b87ff 100644 (file)
@@ -9,8 +9,8 @@
 #ifndef _COAP_URI_H_
 #define _COAP_URI_H_
 
-#include "hashkey.h"
-#include "str.h"
+#include <apps/netutils/libcoap/hashkey.h>
+#include <apps/netutils/libcoap/str.h>
 
 /** Representation of parsed URI. Components may be filled from a
  * string with coap_split_uri() and can be used as input for
index d3eac39..71868ae 100644 (file)
@@ -85,7 +85,7 @@ CFLAGS += -D__TINYARA__
 ifeq ($(CONFIG_NETUTILS_LIBCOAP_DEBUG),n)
 CFLAGS += -DNDEBUG
 endif
-CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)$(DELIM)include$(DELIM)netutils$(DELIM)libcoap}
+#CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)$(DELIM)include$(DELIM)netutils$(DELIM)libcoap}
 
 ifeq ($(CONFIG_WINDOWS_NATIVE),y)
   BIN = ..\..\libapps$(LIBEXT)
index eec79bd..719d564 100644 (file)
 
 #ifndef WITHOUT_ASYNC
 
-#include "config.h"
+#include <apps/netutils/libcoap/config.h>
 
-#include "utlist.h"
+#include <apps/netutils/libcoap/utlist.h>
 
-#include "mem.h"
-#include "debug.h"
-#include "async.h"
+#include <apps/netutils/libcoap/mem.h>
+#include <apps/netutils/libcoap/debug.h>
+#include <apps/netutils/libcoap/async.h>
 
 coap_async_state_t *coap_register_async(coap_context_t *context, coap_address_t *peer, coap_pdu_t *request, unsigned char flags, void *data)
 {
index debe9e8..e34ec9e 100644 (file)
@@ -6,14 +6,14 @@
  * README for terms of use.
  */
 
-#include "config.h"
+#include <apps/netutils/libcoap/config.h>
 
 #if defined(HAVE_ASSERT_H) && !defined(assert)
 #include <assert.h>
 #endif
 
-#include "debug.h"
-#include "block.h"
+#include <apps/netutils/libcoap/debug.h>
+#include <apps/netutils/libcoap/block.h>
 
 #define min(a,b) ((a) < (b) ? (a) : (b))
 
index 1b2bd47..3320cb9 100644 (file)
@@ -6,14 +6,14 @@
  * README for terms of use.
  */
 
-#include "config.h"
+#include <apps/netutils/libcoap/config.h>
 
 #include <stdio.h>
 #include <string.h>
 
-#include "debug.h"
-#include "mem.h"
-#include "coap_list.h"
+#include <apps/netutils/libcoap/debug.h>
+#include <apps/netutils/libcoap/mem.h>
+#include <apps/netutils/libcoap/coap_list.h>
 
 int coap_insert(coap_list_t **queue, coap_list_t *node, int (*order)(void *, void *node))
 {
index c889e23..fbe7192 100644 (file)
@@ -6,7 +6,7 @@
  * README for terms of use.
  */
 
-#include "config.h"
+#include <apps/netutils/libcoap/config.h>
 
 #if defined(HAVE_ASSERT_H) && !defined(assert)
 #include <assert.h>
@@ -25,8 +25,8 @@
 #include <time.h>
 #endif
 
-#include "debug.h"
-#include "net.h"
+#include <apps/netutils/libcoap/debug.h>
+#include <apps/netutils/libcoap/net.h>
 
 #ifdef WITH_CONTIKI
 #ifndef DEBUG
index 0ff9a36..db10368 100644 (file)
@@ -10,8 +10,8 @@
 #include <stdio.h>
 #endif
 
-#include "config.h"
-#include "encode.h"
+#include <apps/netutils/libcoap/config.h>
+#include <apps/netutils/libcoap/encode.h>
 
 /* Carsten suggested this when fls() is not available: */
 int coap_fls(unsigned int i)
index 8d67e7a..8a63ade 100644 (file)
@@ -6,7 +6,7 @@
  * README for terms of use.
  */
 
-#include "hashkey.h"
+#include <apps/netutils/libcoap/hashkey.h>
 
 /* Caution: When changing this, update COAP_DEFAULT_WKC_HASHKEY
  * accordingly (see int coap_hash_path());
index 920815f..432e362 100644 (file)
@@ -6,7 +6,7 @@
  * README for terms of use.
  */
 
-#include "config.h"
+#include <apps/netutils/libcoap/config.h>
 
 #include <ctype.h>
 #include <stdio.h>
 #include <net/lwip/timers.h>
 #endif
 
-#include "debug.h"
-#include "mem.h"
-#include "str.h"
-#include "async.h"
-#include "resource.h"
-#include "option.h"
-#include "encode.h"
-#include "block.h"
-#include "net.h"
+#include <apps/netutils/libcoap/debug.h>
+#include <apps/netutils/libcoap/mem.h>
+#include <apps/netutils/libcoap/str.h>
+#include <apps/netutils/libcoap/async.h>
+#include <apps/netutils/libcoap/resource.h>
+#include <apps/netutils/libcoap/option.h>
+#include <apps/netutils/libcoap/encode.h>
+#include <apps/netutils/libcoap/block.h>
+#include <apps/netutils/libcoap/net.h>
 
 #if defined(WITH_POSIX)
 
index 6d6275a..6c36de7 100644 (file)
@@ -7,7 +7,7 @@
  * README for terms of use.
  */
 
-#include "config.h"
+#include <apps/netutils/libcoap/config.h>
 
 #if defined(HAVE_ASSERT_H) && !defined(assert)
 #include <assert.h>
@@ -16,8 +16,8 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "option.h"
-#include "debug.h"
+#include <apps/netutils/libcoap/option.h>
+#include <apps/netutils/libcoap/debug.h>
 
 coap_opt_t *options_start(coap_pdu_t *pdu)
 {
index a1e8be3..8241dfc 100644 (file)
@@ -6,7 +6,7 @@
  * README for terms of use.
  */
 
-#include "config.h"
+#include <apps/netutils/libcoap/config.h>
 
 #if defined(HAVE_ASSERT_H) && !defined(assert)
 #include <assert.h>
 #include <arpa/inet.h>
 #endif
 
-#include "debug.h"
-#include "pdu.h"
-#include "option.h"
-#include "encode.h"
+#include <apps/netutils/libcoap/debug.h>
+#include <apps/netutils/libcoap/pdu.h>
+#include <apps/netutils/libcoap/option.h>
+#include <apps/netutils/libcoap/encode.h>
 
 #ifdef WITH_CONTIKI
 #include "memb.h"
@@ -36,7 +36,7 @@ void coap_pdu_resources_init()
        memb_init(&pdu_storage);
 }
 #else                                                  /* WITH_CONTIKI */
-#include "mem.h"
+#include <apps/netutils/libcoap/mem.h>
 #endif                                                 /* WITH_CONTIKI */
 
 void coap_pdu_clear(coap_pdu_t *pdu, size_t size)
index eb06722..71e90f1 100644 (file)
@@ -6,11 +6,11 @@
  * README for terms of use.
  */
 
-#include "config.h"
-#include "net.h"
-#include "debug.h"
-#include "resource.h"
-#include "subscribe.h"
+#include <apps/netutils/libcoap/config.h>
+#include <apps/netutils/libcoap/net.h>
+#include <apps/netutils/libcoap/debug.h>
+#include <apps/netutils/libcoap/resource.h>
+#include <apps/netutils/libcoap/subscribe.h>
 
 #ifdef WITH_LWIP
 #include "utlist.h"
@@ -28,8 +28,8 @@
 
 #endif
 #ifdef WITH_POSIX
-#include "utlist.h"
-#include "mem.h"
+#include <apps/netutils/libcoap/utlist.h>
+#include <apps/netutils/libcoap/mem.h>
 
 #define COAP_MALLOC_TYPE(Type) \
   ((coap_##Type##_t *)coap_malloc(sizeof(coap_##Type##_t)))
index 7521c80..74307f9 100644 (file)
@@ -6,13 +6,13 @@
  * README for terms of use.
  */
 
-#include "config.h"
+#include <apps/netutils/libcoap/config.h>
 
 #include <stdio.h>
 
-#include "debug.h"
-#include "mem.h"
-#include "str.h"
+#include <apps/netutils/libcoap/debug.h>
+#include <apps/netutils/libcoap/mem.h>
+#include <apps/netutils/libcoap/str.h>
 
 str *coap_new_string(size_t size)
 {
index 784ff94..4765989 100644 (file)
@@ -7,7 +7,7 @@
  * README for terms of use.
  */
 
-#include "config.h"
+#include <apps/netutils/libcoap/config.h>
 
 #if defined(HAVE_ASSERT_H) && !defined(assert)
 #include <assert.h>
 
 /* #include "resource.h" */
 
-#include "mem.h"
-#include "encode.h"
-#include "debug.h"
-#include "subscribe.h"
+#include <apps/netutils/libcoap/mem.h>
+#include <apps/netutils/libcoap/encode.h>
+#include <apps/netutils/libcoap/debug.h>
+#include <apps/netutils/libcoap/subscribe.h>
 
 void coap_subscription_init(coap_subscription_t *s)
 {
index a5f481d..0a5b97a 100644 (file)
@@ -6,7 +6,7 @@
  * README for terms of use.
  */
 
-#include "config.h"
+#include <apps/netutils/libcoap/config.h>
 
 #if defined(HAVE_ASSERT_H) && !defined(assert)
 #include <assert.h>
 #include <string.h>
 #include <ctype.h>
 
-#include "mem.h"
-#include "debug.h"
-#include "pdu.h"
-#include "option.h"
-#include "uri.h"
+#include <apps/netutils/libcoap/mem.h>
+#include <apps/netutils/libcoap/debug.h>
+#include <apps/netutils/libcoap/pdu.h>
+#include <apps/netutils/libcoap/option.h>
+#include <apps/netutils/libcoap/uri.h>
 
 /**
  * A length-safe version of strchr(). This function returns a pointer