diff --git a/Platform/user/configm/config-server/configserver.c b/Platform/user/configm/config-server/configserver.c index 149a4e6e6..6fbe53577 100644 --- a/Platform/user/configm/config-server/configserver.c +++ b/Platform/user/configm/config-server/configserver.c @@ -206,9 +206,7 @@ void cm_config_process(rpc_conn *conn, pointer input, int input_len, void* data) char *cm_get_buff = NULL; ret_code ret = RET_OK; int config_len = 0; - short* single_len = NULL; int buff_len = CM_BUFF_SIZE; - int index = 0, cnt = 0; if(conn == NULL || input == NULL) { @@ -286,24 +284,10 @@ void cm_config_process(rpc_conn *conn, pointer input, int input_len, void* data) case CM_CONFIG_GET_ALL: if(config_svr->getall_callback) { - single_len = rpc_new(short, CM_BUFF_SIZE); - if(single_len == NULL) - { - rpc_return_error(conn, RET_NOMEM, "not enough memery"); - goto exit; - } ret = config_svr->getall_callback(config_msg->source, - config_svr->config_id, cm_get_buff, - single_len, - &cnt); - - buff_len = 0; - for(index = 0 ; index < cnt; index++) - { - buff_len = buff_len + single_len[index]; - } + &buff_len); } break; @@ -336,11 +320,6 @@ void cm_config_process(rpc_conn *conn, pointer input, int input_len, void* data) exit: rpc_free(cm_get_buff); - if(single_len != NULL) - { - rpc_free(single_len); - } - return; }