This commit is contained in:
wuhuanzheng 2019-08-28 15:36:08 +08:00
commit e1b97513a4
2 changed files with 6 additions and 2 deletions

View File

@ -26,6 +26,8 @@ typedef uint ret_code;
#define RET_EXIST 11
#define RET_FULL 12
#define RET_SENDERR 13
#define RET_NOCMID 14
#define RET_SRCERR 15
/* NETCONFIG_MODULE 0x00010000 ~ 0x0001ffff*/
#define RET_IPINVALID (uint)((uint)NETCONFIG_MODULE<<16|1)
@ -50,6 +52,8 @@ typedef uint ret_code;
{ RET_EXIST, "AlreadyExist"},\
{ RET_FULL, "Full"},\
{ RET_SENDERR, "SendErr"},\
{ RET_NOCMID, "CanNotFindConfig"},\
{ RET_SRCERR, "ConfigSourceErr"},\
\
{ RET_IPINVALID, "IpInvalid"},\
{ RET_BRNAMEERR, "BrNameInvalid"}\

View File

@ -327,14 +327,14 @@ void cm_config_process(rpc_conn *conn, pointer input, int input_len, void* data)
config_svr = cm_config_service_get(config_msg->config_id);
if(config_svr == NULL)
{
cm_return(conn, RET_NULLP, "NULL pointer");
cm_return(conn, RET_NOCMID, "can not find config id");
return;
}
/*source check*/
if(!(config_svr->config_src & config_msg->source))
{
cm_return(conn, RET_CHKERR, "source check error!\r\n");
cm_return(conn, RET_SRCERR, "source check error!\r\n");
return;
}