summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPyun DoHyun <dh79.pyun@samsung.com>2020-08-24 22:28:14 +0000
committerGerrit Code Review <gerrit@review>2020-08-24 22:28:14 +0000
commit6f92e750acc9f6874b5f521bad2525212f3c0fec (patch)
tree3e50ffa6f2ca639d58f87dc135fc4c173c0d13e0
parent3bd5e977dad0faf4fe62f7f7f31ec94e0b6cc476 (diff)
parent068adbecc599d56549a9b00a247fb33efa7f3613 (diff)
downloadbluetooth-6f92e750acc9f6874b5f521bad2525212f3c0fec.tar.gz
bluetooth-6f92e750acc9f6874b5f521bad2525212f3c0fec.tar.bz2
bluetooth-6f92e750acc9f6874b5f521bad2525212f3c0fec.zip
Merge "Mesh: Convert list variables to global static" into tizen
-rw-r--r--src/bluetooth-mesh.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/src/bluetooth-mesh.c b/src/bluetooth-mesh.c
index a094737..ba000bc 100644
--- a/src/bluetooth-mesh.c
+++ b/src/bluetooth-mesh.c
@@ -51,13 +51,13 @@
static bool is_mesh_initialized = false;
/**< List of Local handles >*/
-GSList *networks;
-GSList *node_list;
-GSList *element_list;
-GSList *model_list;
-GSList *appkey_list;
-GSList *netkey_list;
-GSList *group_list;
+static GSList *networks;
+static GSList *node_list;
+static GSList *element_list;
+static GSList *model_list;
+static GSList *appkey_list;
+static GSList *netkey_list;
+static GSList *group_list;
#define BT_CHECK_MESH_SUPPORT() \
@@ -690,7 +690,7 @@ static void __mesh_unload_network_configurations(gpointer data,
g_strlcpy(net.name.name, network_s->name,
BT_MESH_NETWORK_NAME_STRING_MAX_LEN + 1);
- BT_INFO("Mesh: Send Network Unload Request");
+ BT_INFO("Mesh: Send Network Unload Request: UUID [%s]", net.uuid);
if (BLUETOOTH_ERROR_NONE != bluetooth_mesh_network_unload(&net)) {
BT_ERR("Mesh: Failed to Unload Network [%s]",
network_s->uuid);
@@ -715,9 +715,10 @@ int bt_mesh_deinitialize(void)
BT_CHECK_MESH_INIT_STATUS();
int error;
- BT_INFO("Mesh: Mesh Deinitialized");
+ BT_INFO("Mesh: Mesh Deinitialize");
- BT_INFO("Mesh: Remove each Network configuration");
+ BT_INFO("Mesh: Remove All Network: Total Nets [%d]",
+ g_slist_length(networks));
/* Unload All Network Configurations */
g_slist_foreach(networks,
__mesh_unload_network_configurations,
@@ -1371,8 +1372,14 @@ int bt_mesh_network_create(bt_mesh_node_h config_client,
*network = (bt_mesh_network_h)network_s;
/* Save network in list */
+ BT_INFO("Mesh: Total networks present in app [%d]",
+ g_slist_length(networks));
+
networks = g_slist_append(networks, network_s);
+ BT_INFO("Mesh: Total networks present in app: After update [%d]",
+ g_slist_length(networks));
+
/* Clean up memory */
for (int i = 0; i < num_models; i++)
g_free(param_model[i]);