From 5fcd1f99f8f9d2622cc5d4ecdc27bd48add59eff Mon Sep 17 00:00:00 2001 From: sungrae jo Date: Mon, 26 Mar 2018 14:21:12 +0900 Subject: [PATCH] Fixed command_count function args Change-Id: I1bf541b9b20941a91e69caf4a095b991f60551c0 Signed-off-by: sungrae jo --- include/vce.h | 2 +- server/vcd_engine_agent.c | 5 +++-- server/vcd_engine_agent.h | 2 +- server/vcd_server.c | 4 ++-- server/vcd_server.h | 2 +- server/vce.c | 4 ++-- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/include/vce.h b/include/vce.h index 3d0946a..9340688 100755 --- a/include/vce.h +++ b/include/vce.h @@ -772,7 +772,7 @@ int vce_get_foreach_command(vce_cmd_h vce_command, vce_command_cb callback, void * @return the value greater than 0 on success * @see vce_set_commands() */ -int vce_get_command_count(vce_cmd_h vce_command); +int vce_get_command_count(vce_cmd_h vce_command, int* count); /** * @brief Gets current audio type. diff --git a/server/vcd_engine_agent.c b/server/vcd_engine_agent.c index cd861bc..6c9dd57 100644 --- a/server/vcd_engine_agent.c +++ b/server/vcd_engine_agent.c @@ -725,11 +725,12 @@ int vcd_engine_agent_get_foreach_command(vce_cmd_h vce_command, vce_command_cb c return vcd_client_foreach_command((client_foreach_command_cb)callback, user_data); } -int vcd_engine_agent_get_command_count(vce_cmd_h vce_command) +int vcd_engine_agent_get_command_count(vce_cmd_h vce_command, int* count) { SLOG(LOG_DEBUG, TAG_VCD, "[Engine Agent] Request command length from engine"); - return vcd_client_get_length(); + *count = vcd_client_get_length(); + return 0; } int vcd_engine_agent_get_audio_type(char** audio_type) diff --git a/server/vcd_engine_agent.h b/server/vcd_engine_agent.h index 4fa59d8..a327584 100644 --- a/server/vcd_engine_agent.h +++ b/server/vcd_engine_agent.h @@ -83,7 +83,7 @@ int vcd_engine_process_haptic_event(int pid, const char* event); /* for engine service */ int vcd_engine_agent_get_foreach_command(vce_cmd_h vce_command, vce_command_cb callback, void* user_data); -int vcd_engine_agent_get_command_count(vce_cmd_h vce_command); +int vcd_engine_agent_get_command_count(vce_cmd_h vce_command, int* count); int vcd_engine_agent_get_audio_type(char** audio_type); diff --git a/server/vcd_server.c b/server/vcd_server.c index a525662..299a143 100755 --- a/server/vcd_server.c +++ b/server/vcd_server.c @@ -2471,12 +2471,12 @@ int vcd_get_foreach_command(vce_cmd_h vce_command, vce_command_cb callback, void return ret; } -int vcd_get_command_count(vce_cmd_h vce_command) +int vcd_get_command_count(vce_cmd_h vce_command, int* count) { SLOG(LOG_DEBUG, TAG_VCD, "[Server] Get command count"); int ret = 0; - ret = vcd_engine_agent_get_command_count(vce_command); + ret = vcd_engine_agent_get_command_count(vce_command, count); if (0 > ret) { SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] Fail to get command count : ret(%d)", ret); } diff --git a/server/vcd_server.h b/server/vcd_server.h index 6df0154..70bc3d9 100644 --- a/server/vcd_server.h +++ b/server/vcd_server.h @@ -139,7 +139,7 @@ int vcd_send_error(vce_error_e error, const char* msg, void *user_data); int vcd_get_foreach_command(vce_cmd_h vce_command, vce_command_cb callback, void* user_data); -int vcd_get_command_count(vce_cmd_h vce_command); +int vcd_get_command_count(vce_cmd_h vce_command, int* count); int vcd_get_audio_type(char** audio_type); diff --git a/server/vce.c b/server/vce.c index b7fb585..bb3ed2d 100755 --- a/server/vce.c +++ b/server/vce.c @@ -144,11 +144,11 @@ int vce_get_foreach_command(vce_cmd_h vce_command, vce_command_cb callback, void return ret; } -int vce_get_command_count(vce_cmd_h vce_command) +int vce_get_command_count(vce_cmd_h vce_command, int* count) { int ret = VCE_ERROR_NONE; - ret = vcd_get_command_count(vce_command); + ret = vcd_get_command_count(vce_command, count); if (0 != ret) { SLOG(LOG_ERROR, TAG_VCD, "[ERROR] Fail to get command count"); } -- 2.7.4