diff --git a/config/vcpe.cfg b/config/vcpe.cfg index 6b9f483..2458966 100644 --- a/config/vcpe.cfg +++ b/config/vcpe.cfg @@ -13,8 +13,8 @@ application: }; agent: { - iptv_report_url = "http://10.0.0.1:50012/vcpe/dhcp/info"; # IPTV 设备上报接口 - moniter_rep_url = "http://10.0.0.1:50012/vcpe/dhcp/restart"; # vCPE设备上下线接口 + iptv_report_url = ""; # IPTV 设备上报接口 + moniter_rep_url = ""; # vCPE设备上下线接口 }; # 硬件监控相关配置内容 diff --git a/srcs/vcpe_main.c b/srcs/vcpe_main.c index 683193e..65d8979 100644 --- a/srcs/vcpe_main.c +++ b/srcs/vcpe_main.c @@ -7,6 +7,9 @@ #include "cmdline.h" #include "task_manager.h" #include "init.h" +#ifdef NOTIFY_VCPE_STATUS +#include "inet_misc.h" +#endif #include "config.h" #include "zlog_module.h" @@ -47,6 +50,7 @@ static void lwip_init_env() { } #endif +#ifdef NOTIFY_VCPE_STATUS cJSON *create_app_process_status(int isStart) { cJSON *pRspMsg = cJSON_CreateObject(); #ifdef USERVNI_ON @@ -73,6 +77,7 @@ static void on_http_response_cb(void *pData, free(pUserData); } +#endif int main(int argc, char **argv) { int ret; @@ -102,13 +107,17 @@ int main(int argc, char **argv) { pppoe_session_init(); #endif - // const char *pStrSetup = proto_create_new(create_app_process_status(1), 200); - // inet_http_post_async(config_get_agent_moniter_report_url(), pStrSetup, on_http_response_cb, (void *)pStrSetup); +#ifdef NOTIFY_VCPE_STATUS + const char *pStrSetup = proto_create_new(create_app_process_status(1), 200); + inet_http_post_async(config_get_agent_moniter_report_url(), pStrSetup, on_http_response_cb, (void *)pStrSetup); +#endif task_manager_run(); - // - // const char *pStrExit = proto_create_new(create_app_process_status(0), 200); - // inet_http_post_async(config_get_agent_moniter_report_url(), pStrSetup, on_http_response_cb, (void *)pStrExit); + +#ifdef NOTIFY_VCPE_STATUS + const char *pStrExit = proto_create_new(create_app_process_status(0), 200); + inet_http_post_async(config_get_agent_moniter_report_url(), pStrSetup, on_http_response_cb, (void *)pStrExit); +#endif while (!is_system_cleanup()) { sleep(1);