_bt_mesh_event_cb(BLUETOOTH_EVENT_MESH_NODE_TTL_CONFIGURED,
result, info,
event_info->cb, event_info->user_data);
- } else if (strcasecmp(signal_name, BT_MESH_NODE_TTL_CONFIGURED) == 0) {
- int result;
- GVariant *param = NULL;
- GArray *dbus_data = NULL;
- bluetooth_mesh_node_ttl_info_t *info = NULL;
-
- g_variant_get(parameters, "(iv)", &result, ¶m);
- dbus_data = g_array_new(TRUE, TRUE, sizeof(gchar));
-
- __bt_fill_garray_from_variant(param, dbus_data);
- g_variant_unref(param);
-
- info = &g_array_index(dbus_data, bluetooth_mesh_node_ttl_info_t, 0);
-
- _bt_mesh_event_cb(BLUETOOTH_EVENT_MESH_NODE_TTL_CONFIGURED,
- result, info,
- event_info->cb, event_info->user_data);
} else if (strcasecmp(signal_name, BT_MESH_MODEL_SUB_CONF) == 0) {
int result;
GVariant *param = NULL;
l = g_slist_find_custom(mesh_apps, net_uuid,
__mesh_compare_network_uuid);
- if (l) {
+ if (l)
app = l->data;
- } else {
+ else
ERR("Mesh: app not found");
- }
memset(&ev, 0, sizeof(ev));
bool _bt_mesh_conf_parse_data(void *cfg, int k);
-bool _bt_mesh_conf_set_vendor_info(_bt_mesh_cdb_t *cfg,uint16_t unicast,
+bool _bt_mesh_conf_set_vendor_info(_bt_mesh_cdb_t *cfg, uint16_t unicast,
uint16_t crpl, uint16_t cid, uint16_t vid, uint16_t pid,
- int proxy, int relay,int lpn, int frnd);
+ int proxy, int relay, int lpn, int frnd);
bool _bt_mesh_conf_set_model_info(_bt_mesh_cdb_t *cfg,
uint16_t unicast, GSList *models);
}
sz = json_object_array_length(jarray);
- if (sz == 0 ){
+ if (sz == 0) {
BT_ERR("Mesh: Element array length is 0");
return false;
}
return false;
/* Delete group address */
- if (!json_object_object_get_ex(jmodel, "sub-addr", &jgroups)) {
+ if (!json_object_object_get_ex(jmodel, "sub-addr", &jgroups))
return false;
- }
- if(!__mesh_del_sub_group(jgroups, group_addr))
+ if (!__mesh_del_sub_group(jgroups, group_addr))
return false;
/* Save */
if (!jmodel)
return false;
- /* Delete all roup address */
- if (!json_object_object_get_ex(jmodel, "sub-addr", &jgroups)) {
+ /* Delete all group address */
+ if (!json_object_object_get_ex(jmodel, "sub-addr", &jgroups))
return false;
- }
sz = json_object_array_length(jgroups);
BT_INFO("Mesh: Total sub-addr entry present is [%d]", sz);
- for (int i = sz - 1; i >= 0 ; --i) {
+ for (int i = sz - 1; i >= 0 ; --i)
json_object_array_del_idx(jgroups, i, 1);
- }
/* Save */
return __bt_mesh_save_configruation_file(cfg);
}
static void __bt_mesh_init_wait_response_timeout(
- struct l_timeout *timeout, void *user_data)
+ struct l_timeout *timeout, void *user_data)
{
int result = BLUETOOTH_ERROR_TIMEOUT;