Mesh: Handle Multi-application init & deinit logic
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / services / bt-request-handler.c
index 8e17a47..5b0b430 100644 (file)
@@ -3485,6 +3485,18 @@ normal:
                g_free((gpointer)requester_unique_creds);
                break;
        }
+       case BT_MESH_NETWORK_UNLOAD: {
+               bluetooth_mesh_network_t network;
+               memset(&network, 0x00, sizeof(bluetooth_mesh_network_t));
+
+               __bt_service_get_parameters(in_param1,
+                               &network, sizeof(bluetooth_mesh_network_t));
+
+               BT_INFO("MESH: Network Unload: Network UUID [%s]", network.uuid);
+               result = _bt_mesh_network_unload(requester_unique_creds,
+                               sender, &network);
+               break;
+       }
        case BT_MESH_NETWORK_SCAN: {
                bluetooth_mesh_network_t network;
                bluetooth_mesh_scan_param_t param;
@@ -5130,6 +5142,7 @@ gboolean __bt_service_check_privilege(int function_name,
        case BT_MESH_NETWORK_CREATE:
        case BT_MESH_NETWORK_DESTROY:
        case BT_MESH_NETWORK_LOAD:
+       case BT_MESH_NETWORK_UNLOAD:
        case BT_MESH_NETWORK_SCAN:
        case BT_MESH_NETWORK_CANCEL_SCAN:
        case BT_MESH_NETWORK_SET_CAPABILITIES: