Diff between 0da516115403d80534b37c61cc1bfdd731d14059 and de6c9e2cf05d7ecc4f11f33c5a2b5a9da33edf5a

Changed Files

File Additions Deletions Status
mesh/agent.h +0 -13 modified
mesh/config-model.h +0 -17 modified
mesh/crypto.h +0 -13 modified
mesh/gatt.h +0 -14 modified
mesh/keys.h +0 -4 modified
mesh/mesh-net.h +1 -15 modified
mesh/net.h +0 -14 modified
mesh/node.h +0 -12 modified
mesh/onoff-model.h +0 -17 modified
mesh/prov-db.h +0 -12 modified
mesh/prov.h +0 -12 modified
mesh/util.c +1 -0 modified
mesh/util.h +1 -17 modified

Full Patch

diff --git a/mesh/agent.h b/mesh/agent.h
index fe19353..9db4321 100644
--- a/mesh/agent.h
+++ b/mesh/agent.h
@@ -21,13 +21,6 @@
  *
  */
 
-#ifndef __MESH_AGENT_H
-#define __MESH_AGENT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #define MAX_HEXADECIMAL_OOB_LEN	128
 #define DECIMAL_OOB_LEN		4
 #define MAX_ASCII_OOB_LEN		16
@@ -50,9 +43,3 @@ void agent_output_request_cancel(void);
 bool agent_completion(void);
 bool agent_input(const char *input);
 void agent_release(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MESH_AGENT_H */
diff --git a/mesh/config-model.h b/mesh/config-model.h
index 115491f..be7acab 100644
--- a/mesh/config-model.h
+++ b/mesh/config-model.h
@@ -21,17 +21,6 @@
  *
  */
 
-#ifndef __MESH_CONFIG_MODEL_H
-#define __MESH_CONFIG_MODEL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #define CONFIG_SERVER_MODEL_ID	0x0000
 #define CONFIG_CLIENT_MODEL_ID	0x0001
 
@@ -111,9 +100,3 @@ bool config_server_init(void);
 bool config_client_init(void);
 void config_client_get_composition(uint32_t dst);
 void config_set_node(const char *args);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MESH_CONFIG_MODEL_H */
diff --git a/mesh/crypto.h b/mesh/crypto.h
index 98bc065..e8f16f3 100644
--- a/mesh/crypto.h
+++ b/mesh/crypto.h
@@ -21,13 +21,6 @@
  *
  */
 
-#ifndef __MESH_CRYPTO_H
-#define __MESH_CRYPTO_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include <stdbool.h>
 #include <stdint.h>
 
@@ -125,9 +118,3 @@ bool mesh_crypto_aes_cmac(const uint8_t key[16], const uint8_t *msg,
 					size_t msg_len, uint8_t res[16]);
 
 bool mesh_get_random_bytes(void *buf, size_t num_bytes);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/mesh/gatt.h b/mesh/gatt.h
index 2f7a3fc..a2aae25 100644
--- a/mesh/gatt.h
+++ b/mesh/gatt.h
@@ -21,15 +21,7 @@
  *
  */
 
-#ifndef __MESH_GATT_H
-#define __MESH_GATT_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include "gdbus/gdbus.h"
-#include "mesh/node.h"
 
 uint16_t mesh_gatt_sar(uint8_t **pkt, uint16_t size);
 bool mesh_gatt_is_child(GDBusProxy *proxy, GDBusProxy *parent,
@@ -39,9 +31,3 @@ bool mesh_gatt_write(GDBusProxy *proxy, uint8_t *buf, uint16_t len,
 bool mesh_gatt_notify(GDBusProxy *proxy, bool enable, GDBusReturnFunction cb,
 			void *user_data);
 void mesh_gatt_cleanup(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MESH_GATT_H */
diff --git a/mesh/keys.h b/mesh/keys.h
index 5b955b2..477ff13 100644
--- a/mesh/keys.h
+++ b/mesh/keys.h
@@ -21,10 +21,6 @@
  *
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #define KR_PHASE_NONE		0x00
 #define KR_PHASE_ONE		0x01
 #define KR_PHASE_TWO		0x02
diff --git a/mesh/mesh-net.h b/mesh/mesh-net.h
index cb6c6e4..76a9822 100644
--- a/mesh/mesh-net.h
+++ b/mesh/mesh-net.h
@@ -21,13 +21,6 @@
  *
  */
 
-#ifndef __MESH_NETORK_H
-#define __MESH_NETORK_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /* Proxy PDU Types */
 #define PROXY_NETWORK_PDU	0x00
 #define PROXY_MESH_BEACON	0x01
@@ -35,7 +28,7 @@ extern "C" {
 #define PROXY_PROVISIONING_PDU	0x03
 
 #define CTL		0x80
-#define TTL_MASK 	0x7f
+#define TTL_MASK	0x7f
 #define SEQ_MASK	0xffffff
 
 #define CREDFLAG_MASK	0x1000
@@ -165,10 +158,3 @@ extern "C" {
 #define MESH_STATUS_CANNOT_SET		0x0f
 #define MESH_STATUS_UNSPECIFIED_ERROR	0x10
 #define MESH_STATUS_INVALID_BINDING	0x11
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MESH_NETORK_H */
diff --git a/mesh/net.h b/mesh/net.h
index b357afa..b388d61 100644
--- a/mesh/net.h
+++ b/mesh/net.h
@@ -21,15 +21,7 @@
  *
  */
 
-#ifndef __MESH_NET_H
-#define __MESH_NET_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include "gdbus/gdbus.h"
-#include "mesh/node.h"
 
 typedef void (*net_mesh_session_open_callback)(int status);
 
@@ -64,9 +56,3 @@ bool net_register_group(uint16_t group_addr);
 uint32_t net_register_virtual(uint8_t buf[16]);
 bool mesh_model_recv(uint16_t app_idx, uint16_t src, uint32_t dst,
 						uint8_t *payload, uint16_t len);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MESH_NET_H */
diff --git a/mesh/node.h b/mesh/node.h
index 40b964c..68c60eb 100644
--- a/mesh/node.h
+++ b/mesh/node.h
@@ -21,13 +21,6 @@
  *
  */
 
-#ifndef __MESH_NODE_H
-#define __MESH_NODE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /* Largest Possible GATT Packet: Provisioning Public Key + type + sar */
 #define MAX_GATT_SIZE	(64 + 1 + 1)
 
@@ -139,8 +132,3 @@ bool node_model_pub_set(struct mesh_node *node, uint8_t ele, uint32_t model_id,
 						struct mesh_publication *pub);
 struct mesh_publication *node_model_pub_get(struct mesh_node *node, uint8_t ele,
 							uint32_t model_id);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MESH_NODE_H */
diff --git a/mesh/onoff-model.h b/mesh/onoff-model.h
index 57f3ecc..3159905 100644
--- a/mesh/onoff-model.h
+++ b/mesh/onoff-model.h
@@ -21,17 +21,6 @@
  *
  */
 
-#ifndef __MESH_GENERIC_ONOFF_MODEL_H
-#define __MESH_GENERIC_ONOFF_MODEL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #define GENERIC_ONOFF_SERVER_MODEL_ID	0x1000
 #define GENERIC_ONOFF_CLIENT_MODEL_ID	0x1001
 
@@ -42,9 +31,3 @@ extern "C" {
 
 void onoff_set_node(const char *args);
 bool onoff_client_init(uint8_t ele);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MESH_GENERIC_ONOFF_MODEL_H */
diff --git a/mesh/prov-db.h b/mesh/prov-db.h
index 6b95937..b1e4c62 100644
--- a/mesh/prov-db.h
+++ b/mesh/prov-db.h
@@ -21,13 +21,6 @@
  *
  */
 
-#ifndef __MESH_PROV_DB_H
-#define __MESH_PROV_DB_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 bool prov_db_show(const char *filename);
 bool prov_db_read(const char *filename);
 bool prov_db_read_local_node(const char *filename, bool provisioner);
@@ -45,8 +38,3 @@ bool prov_db_node_set_model_pub(struct mesh_node *node, uint8_t ele_idx,
 							uint32_t model_id,
 						struct mesh_publication *pub);
 void prov_db_print_node_composition(struct mesh_node *node);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MESH_PROV_DB_H */
diff --git a/mesh/prov.h b/mesh/prov.h
index c4e068a..94ce7a1 100644
--- a/mesh/prov.h
+++ b/mesh/prov.h
@@ -21,13 +21,6 @@
  *
  */
 
-#ifndef __MESH_PROV_H
-#define __MESH_PROV_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 struct prov;
 
 typedef void (*provision_done_cb)(void *user_data, int status);
@@ -36,8 +29,3 @@ bool prov_open(struct mesh_node *node, GDBusProxy *prov_in, uint16_t net_idx,
 		provision_done_cb cb, void *user_data);
 bool prov_data_ready(struct mesh_node *node, uint8_t *buf, uint8_t len);
 bool prov_complete(struct mesh_node *node, uint8_t status);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MESH_PROV_H */
diff --git a/mesh/util.c b/mesh/util.c
index b084c45..fac4bab 100644
--- a/mesh/util.c
+++ b/mesh/util.c
@@ -34,6 +34,7 @@
 #include "client/display.h"
 #include "src/shared/util.h"
 #include "mesh/mesh-net.h"
+#include "mesh/node.h"
 #include "mesh/util.h"
 
 struct cmd_menu {
diff --git a/mesh/util.h b/mesh/util.h
index eaf4857..7f729ab 100644
--- a/mesh/util.h
+++ b/mesh/util.h
@@ -21,20 +21,9 @@
  *
  */
 
-#ifndef __MESH_UTIL_H
-#define __MESH_UTIL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <stdbool.h>
 
-#include "mesh/node.h"
+struct mesh_publication;
 
 #define OP_UNRELIABLE			0x0100
 
@@ -64,8 +53,3 @@ const char *mesh_status_str(uint8_t status);
 void print_model_pub(uint16_t ele_addr, uint32_t mod_id,
 						struct mesh_publication *pub);
 void swap_u256_bytes(uint8_t *u256);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __MESH_UTIL_H */