mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2026-03-14 04:49:58 +01:00
Ticket refs #6311: icwmpd: crash during upgrade or factory reset
This commit is contained in:
parent
1b5b3b3f8d
commit
f00765f00b
2 changed files with 6 additions and 5 deletions
7
event.c
7
event.c
|
|
@ -159,15 +159,16 @@ int event_remove_noretry_event_container(struct session *session, struct cwmp *c
|
|||
|
||||
list_for_each_safe (ilist, q, &(session->head_event_container)) {
|
||||
event_container = list_entry(ilist, struct event_container, list);
|
||||
|
||||
if (EVENT_CONST[event_container->code].CODE[0] == '6')
|
||||
cwmp->cwmp_cr_event = 1;
|
||||
|
||||
if (EVENT_CONST[event_container->code].RETRY == 0) {
|
||||
free(event_container->command_key);
|
||||
cwmp_free_all_dm_parameter_list(&(event_container->head_dm_parameter));
|
||||
list_del(&(event_container->list));
|
||||
free(event_container);
|
||||
}
|
||||
|
||||
if (EVENT_CONST[event_container->code].CODE[0] == '6')
|
||||
cwmp->cwmp_cr_event = 1;
|
||||
}
|
||||
return CWMP_OK;
|
||||
}
|
||||
|
|
|
|||
4
ubus.c
4
ubus.c
|
|
@ -111,13 +111,13 @@ static int cwmp_handle_command(struct ubus_context *ctx, struct ubus_object *obj
|
|||
pthread_cond_signal(&threshold_apply_schedule_download);
|
||||
pthread_cond_signal(&threshold_upload);
|
||||
|
||||
uloop_end();
|
||||
|
||||
shutdown(cwmp_main.cr_socket_desc, SHUT_RDWR);
|
||||
|
||||
if (!signal_exit)
|
||||
kill(getpid(), SIGTERM);
|
||||
|
||||
uloop_end();
|
||||
|
||||
if (snprintf(info, sizeof(info), "icwmpd daemon stopped") == -1)
|
||||
return -1;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue