Mod aaa-12 修改用户认证结果记录表为全局变量,web_auth.c文件中加main函数

RCA:
SOL:
修改人:
检视人:
This commit is contained in:
ChenLing 2019-07-29 10:50:38 +08:00
parent 8614a46de3
commit b64957428a
2 changed files with 19 additions and 1 deletions

View File

@ -165,6 +165,24 @@ ret_code user_auth(pointer content, RESULT *uresult)
return ret;
}
int main(int args, char** argv)
{
RESULT *output;
ret_code ret;
/*创建内存地址 */
output = (RESULT*)malloc(sizeof(RESULT));
if (NULL == output)
{
ret = RET_NOMEM;
return -1;
}
char *test = "{\"username\": \"用户02\",\"password\": \"123456\"}";
ret = user_auth(test, output);
printf("%d\n", ret);
return 0;
}

View File

@ -59,7 +59,7 @@ do { \
}; \
/* 定义用户认证结果记录表 */
static USER_AUTH_LIST g_user_auth_ret_table[AUTH_USER_INDEX_MAX] = { 0 };
USER_AUTH_LIST g_user_auth_ret_table[AUTH_USER_INDEX_MAX] = { 0 };
/*
* config_lock_time -,()