mirror of
https://github.com/Telecominfraproject/wlan-ucentral-client.git
synced 2026-01-27 02:23:32 +00:00
ucentral-client: added the support to remove old public IP file once it is connected successfully to controller
Signed-off-by: Satya-sc <Satya@shasta.cloud>
This commit is contained in:
3
main.c
3
main.c
@@ -10,6 +10,8 @@
|
||||
|
||||
#include "ucentral.h"
|
||||
|
||||
#define PUBLIC_IP_FILE "/tmp/public_ip"
|
||||
|
||||
static int reconnect_timeout;
|
||||
static int bad_CN;
|
||||
static struct lws_context *context;
|
||||
@@ -236,6 +238,7 @@ callback_broker(struct lws *wsi, enum lws_callback_reasons reason,
|
||||
reconnect_timeout = 1;
|
||||
set_conn_time();
|
||||
websocket = wsi;
|
||||
remove(PUBLIC_IP_FILE);
|
||||
connect_send();
|
||||
crashlog_init();
|
||||
event_backlog();
|
||||
|
||||
Reference in New Issue
Block a user