Commit 8f672563 authored by Georgi Chorbadzhiyski's avatar Georgi Chorbadzhiyski

When CMD_SHUTDOWN is received set b_exit_now flag to exit cleanly.

parent 32c854f8
......@@ -148,10 +148,10 @@ void comm_Read( void )
break;
case CMD_SHUTDOWN:
msg_Err( NULL, "shutdown via comm" );
exit(EXIT_SUCCESS);
/* this is a bit violent, but hey, closing everything cleanly
* would do approximately the same */
b_exit_now = 1;
i_answer = RET_OK;
i_answer_size = 0;
break;
default:
msg_Err( NULL, "wrong command %u", i_command );
......
......@@ -166,6 +166,7 @@ extern uint8_t *p_network_name;
extern size_t i_network_name_size;
extern mtime_t i_wallclock;
extern volatile int b_hup_received;
extern volatile int b_exit_now;
extern int i_comm_fd;
extern char *psz_udp_src;
extern int i_asi_adapter;
......
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