ml_service_event_cb event_cb;
void *user_data;
- gchar *path; /** A path to save the received model file */
+ gchar *path; /**< A path to save the received model file */
} _ml_remote_service_s;
/**
* @brief Get ml remote service activation type.
*/
static gboolean
-_mlrs_parse_activate (gchar * activate)
+_mlrs_parse_activate (const gchar * activate)
{
- gboolean ret = TRUE;
-
- if (g_ascii_strcasecmp (activate, "false") == 0) {
- ret = FALSE;
- }
-
- return ret;
+ return (activate && g_ascii_strcasecmp (activate, "true") == 0);
}
/**
return ML_ERROR_INVALID_PARAMETER;
nns_edge_release_handle (mlrs->edge_h);
- g_free (mlrs->path);
- /** Wait some time until release the edge handle. */
+ /* Wait some time until release the edge handle. */
g_usleep (1000000);
+ g_free (mlrs->path);
g_free (mlrs);
return ML_ERROR_NONE;
_mlrs_release_edge_info (edge_info);
- return ret;
+ return ML_ERROR_NONE;
}
/**
- * @brief Register new information, such as neural network models or pipeline descriptions, on a remote server.
-*/
+ * @brief Register new information, such as neural network models or pipeline descriptions, on a remote server.
+ */
int
ml_service_remote_register (ml_service_h handle, ml_option_h option, void *data,
size_t data_len)
ml_agent_lib = ml_agent_shared_lib
if get_option('default_library') == 'static'
- ml_agent_lib = ml_agent_static_lib
+ ml_agent_lib = ml_agent_static_lib
endif
ml_agent_lib_common_objs = ml_agent_shared_lib.extract_objects(ml_agent_lib_common_srcs)
ml_agent_test_lib = ml_agent_test_both_lib.get_shared_lib()
if get_option('default_library') == 'static'
- ml_agent_test_lib = ml_agent_test_both_lib.get_static_lib()
+ ml_agent_test_lib = ml_agent_test_both_lib.get_static_lib()
endif
lib_ml_agent_test_dep = declare_dependency(
endif
if get_option('enable-gcov')
- add_project_arguments('-DENABLE_GCOV=1', language: ['c', 'cpp'])
+ add_project_arguments('-DENABLE_GCOV=1', language: ['c', 'cpp'])
endif
serviceDBPath = get_option('service-db-path')