- change mesh_network_destroy's return type
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
* @see mesh_network_destroy()
*
*/
-void mesh_network_destroy(mesh_network_h network);
+int mesh_network_destroy(mesh_network_h network);
/**
* @brief Gets network mesh network id.
return MESH_ERROR_NONE;
}
-EXPORT_API void mesh_network_destroy(mesh_network_h network)
+EXPORT_API int mesh_network_destroy(mesh_network_h network)
{
struct mesh_network_s *net = network;
CHECK_FEATURE_SUPPORTED(MESH_FEATURE);
if (NULL == net) {
/* LCOV_EXCL_START */
LOGE("Invalid parameter");
- return;
+ return MESH_ERROR_INVALID_PARAMETER;
/* LCOV_EXCL_STOP */
}
free(net);
+
+ return MESH_ERROR_NONE;
}
EXPORT_API int mesh_network_get_meshid(mesh_network_h network, char **meshid)
/* Clear previous found network list */
g_scan_net_idx = 1;
if (g_found_network_list)
- g_list_free_full(g_found_network_list, mesh_network_destroy);
+ g_list_free_full(g_found_network_list, (void *)mesh_network_destroy);
g_found_network_list = NULL;