MOD aaa-12 优化getall函数参数,去除无用参数

SOL  优化getall函数参数,去除无用参数
修改人:zhangliang
检视人:zhangliang
This commit is contained in:
zhanglianghy 2019-07-05 16:39:50 +08:00
parent 4e4b782d7c
commit 14813701e8
1 changed files with 1 additions and 22 deletions

View File

@ -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;
}