Commit 9d88763b authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Periodic inform should be disabled when we are in the active session

parent e5fd0ab8
all: easycwmp-service device-info easycwmp-config
tar xf EasyCwmp-1.8.1.tar.gz
patch -Np1 -d easycwmp-EasyCwmp-1.8.1 < easycwmp-1.8.1-blank_device.patch
patch -Np1 -d easycwmp-EasyCwmp-1.8.1 < easycwmp-1.8.1-suppress_periodic_in_session.patch
cd easycwmp-EasyCwmp-1.8.1 && autoreconf -i
cd easycwmp-EasyCwmp-1.8.1 && ./configure --prefix=/usr --enable-jsonc=1
$(MAKE) -C easycwmp-EasyCwmp-1.8.1
......
diff -uNr easycwmp-EasyCwmp-1.8.1/src/cwmp.c easycwmp-EasyCwmp-1.8.1-suppress_periodic_in_session/src/cwmp.c
--- easycwmp-EasyCwmp-1.8.1/src/cwmp.c 2019-06-24 19:29:07.000000000 +0930
+++ easycwmp-EasyCwmp-1.8.1-suppress_periodic_in_session/src/cwmp.c 2021-04-13 23:18:25.853983606 +0930
@@ -269,6 +269,10 @@
{
mxml_node_t *node;
int method_id;
+ bool periodic_enabled;
+
+ periodic_enabled = config->acs->periodic_enable;
+ config->acs->periodic_enable = false;
log_message(NAME, L_NOTICE, "start session\n");
if (http_client_init()) {
@@ -325,6 +329,7 @@
external_exit();
cwmp->retry_count = 0;
log_message(NAME, L_NOTICE, "end session success\n");
+ config->acs->periodic_enable = periodic_enable;
return 0;
error:
@@ -335,6 +340,7 @@
log_message(NAME, L_NOTICE, "end session failed\n");
cwmp_retry_session();
+ config->acs->periodic_enable = periodic_enable;
return -1;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment