mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2025-12-10 07:44:41 +01:00
change freecwmpd to icwmpd
This commit is contained in:
parent
0536f42ebe
commit
c77872111a
2 changed files with 7 additions and 7 deletions
|
|
@ -264,13 +264,13 @@ root@iopsys:~# ubus call tr069 inform '{"GetRPCMethods":"1"}'
|
||||||
root@iopsys:~#
|
root@iopsys:~#
|
||||||
```
|
```
|
||||||
|
|
||||||
- To reload the icwmp config, use the `command` ubus method with `reload` argument:
|
- To reload the icwmpd config, use the `command` ubus method with `reload` argument:
|
||||||
|
|
||||||
```
|
```
|
||||||
root@iopsys:~# ubus call tr069 command '{"command":"reload"}'
|
root@iopsys:~# ubus call tr069 command '{"command":"reload"}'
|
||||||
{
|
{
|
||||||
"status": 1,
|
"status": 1,
|
||||||
"info": "cwmp config reloaded"
|
"info": "icwmpd config reloaded"
|
||||||
}
|
}
|
||||||
root@iopsys:~#
|
root@iopsys:~#
|
||||||
```
|
```
|
||||||
|
|
|
||||||
10
ubus.c
10
ubus.c
|
|
@ -95,7 +95,7 @@ cwmp_handle_command(struct ubus_context *ctx, struct ubus_object *obj,
|
||||||
CWMP_LOG(INFO, "triggered ubus reload_end_session");
|
CWMP_LOG(INFO, "triggered ubus reload_end_session");
|
||||||
cwmp_set_end_session(END_SESSION_RELOAD);
|
cwmp_set_end_session(END_SESSION_RELOAD);
|
||||||
blobmsg_add_u32(&b, "status", 0);
|
blobmsg_add_u32(&b, "status", 0);
|
||||||
if (asprintf(&info, "freecwmpd config will reload at the end of the session") == -1)
|
if (asprintf(&info, "icwmpd config will reload at the end of the session") == -1)
|
||||||
return -1;
|
return -1;
|
||||||
} else if (!strcmp("reload", cmd)) {
|
} else if (!strcmp("reload", cmd)) {
|
||||||
CWMP_LOG(INFO, "triggered ubus reload");
|
CWMP_LOG(INFO, "triggered ubus reload");
|
||||||
|
|
@ -109,20 +109,20 @@ cwmp_handle_command(struct ubus_context *ctx, struct ubus_object *obj,
|
||||||
cwmp_apply_acs_changes();
|
cwmp_apply_acs_changes();
|
||||||
pthread_mutex_unlock (&(cwmp_main.mutex_session_queue));
|
pthread_mutex_unlock (&(cwmp_main.mutex_session_queue));
|
||||||
blobmsg_add_u32(&b, "status", 0);
|
blobmsg_add_u32(&b, "status", 0);
|
||||||
if (asprintf(&info, "freecwmp config reloaded") == -1)
|
if (asprintf(&info, "icwmpd config reloaded") == -1)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
} else if (!strcmp("reboot_end_session", cmd)) {
|
} else if (!strcmp("reboot_end_session", cmd)) {
|
||||||
CWMP_LOG(INFO, "triggered ubus reboot_end_session");
|
CWMP_LOG(INFO, "triggered ubus reboot_end_session");
|
||||||
cwmp_set_end_session(END_SESSION_REBOOT);
|
cwmp_set_end_session(END_SESSION_REBOOT);
|
||||||
blobmsg_add_u32(&b, "status", 0);
|
blobmsg_add_u32(&b, "status", 0);
|
||||||
if (asprintf(&info, "freecwmp will reboot at the end of the session") == -1)
|
if (asprintf(&info, "icwmpd will reboot at the end of the session") == -1)
|
||||||
return -1;
|
return -1;
|
||||||
} else if (!strcmp("action_end_session", cmd)) {
|
} else if (!strcmp("action_end_session", cmd)) {
|
||||||
CWMP_LOG(INFO, "triggered ubus action_end_session");
|
CWMP_LOG(INFO, "triggered ubus action_end_session");
|
||||||
cwmp_set_end_session(END_SESSION_EXTERNAL_ACTION);
|
cwmp_set_end_session(END_SESSION_EXTERNAL_ACTION);
|
||||||
blobmsg_add_u32(&b, "status", 0);
|
blobmsg_add_u32(&b, "status", 0);
|
||||||
if (asprintf(&info, "freecwmp will execute the scheduled action commands at the end of the session") == -1)
|
if (asprintf(&info, "icwmpd will execute the scheduled action commands at the end of the session") == -1)
|
||||||
return -1;
|
return -1;
|
||||||
} else if (!strcmp("exit", cmd)) {
|
} else if (!strcmp("exit", cmd)) {
|
||||||
pthread_t exit_thread;
|
pthread_t exit_thread;
|
||||||
|
|
@ -136,7 +136,7 @@ cwmp_handle_command(struct ubus_context *ctx, struct ubus_object *obj,
|
||||||
CWMP_LOG(ERROR, "%s", piderr);
|
CWMP_LOG(ERROR, "%s", piderr);
|
||||||
}
|
}
|
||||||
blobmsg_add_u32(&b, "status", 0);
|
blobmsg_add_u32(&b, "status", 0);
|
||||||
if (asprintf(&info, "cwmpd daemon stopped") == -1)
|
if (asprintf(&info, "icwmpd daemon stopped") == -1)
|
||||||
return -1;
|
return -1;
|
||||||
blobmsg_add_string(&b, "info", info);
|
blobmsg_add_string(&b, "info", info);
|
||||||
free(info);
|
free(info);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue