Mod aaa-12 增加ZTP配置文件修改监视开关
RCA: SOL: 修改人:huangxin 检视人:huangxin
This commit is contained in:
parent
85f5bbe0a3
commit
02d7a5d3a1
|
@ -241,6 +241,7 @@ int load_ztp_config(const char *pPath)
|
|||
return ERR_OK;
|
||||
}
|
||||
|
||||
#ifdef MONITOR_ZTP_CFG_FILE
|
||||
static void *__cfg_file_monitor(void *p)
|
||||
{
|
||||
int wd;
|
||||
|
@ -308,6 +309,7 @@ static void *__cfg_file_monitor(void *p)
|
|||
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
int init_configure(const char *pPath)
|
||||
{
|
||||
|
@ -330,7 +332,9 @@ int init_configure(const char *pPath)
|
|||
|
||||
load_ztp_config(g_ztpFilePath);
|
||||
|
||||
#ifdef MONITOR_ZTP_CFG_FILE
|
||||
pthread_create(&g_monThreadId, NULL, __cfg_file_monitor, NULL);
|
||||
#endif
|
||||
|
||||
return ERR_OK;
|
||||
}
|
||||
|
|
|
@ -135,7 +135,7 @@ static void __logColorOutput(const char* pColFmt, UT_string* pLog)
|
|||
|
||||
static void* __logOutputThread(void *p)
|
||||
{
|
||||
(void)p;
|
||||
UNUSED(p);
|
||||
while(g_bEnableLog)
|
||||
{
|
||||
int isWriteLog = FALSE;
|
||||
|
|
10
ztp_main.c
10
ztp_main.c
|
@ -32,8 +32,6 @@ int main(int argc, char** argv)
|
|||
IHW_InitLOG("ZTP", NULL, TRUE);
|
||||
APP_BUILD_INFO("ZTP", ZTP_VERSION);
|
||||
|
||||
LOG_EX(LOG_Debug, "Hello ZTP V2\n");
|
||||
|
||||
init_configure(DEVICE_ZTP_PATH);
|
||||
|
||||
memset(&ztpReq, 0, sizeof(AUTH_ZTH_REQ));
|
||||
|
@ -53,9 +51,11 @@ int main(int argc, char** argv)
|
|||
|
||||
load_dev_config(ZTP_ESN);
|
||||
|
||||
// while(ret == ERR_OK){
|
||||
// usleep(1000);
|
||||
// }
|
||||
#ifdef MONITOR_ZTP_CFG_FILE
|
||||
while(ret == ERR_OK){
|
||||
usleep(1000);
|
||||
}
|
||||
#endif
|
||||
|
||||
IHW_WaitFinishLogout();
|
||||
|
||||
|
|
Loading…
Reference in New Issue