From 11bf4cad5161328ace3da83554ca93c6e9d16892 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 13 Feb 2014 23:09:40 +0000 Subject: clearing sequence window when receiving SIGHUP --- src/uanytun.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/uanytun.c') diff --git a/src/uanytun.c b/src/uanytun.c index 75d21ce..bb573d7 100644 --- a/src/uanytun.c +++ b/src/uanytun.c @@ -248,10 +248,16 @@ int main_loop(tun_device_t* dev, udp_t* sock, options_t* opt) continue; if(FD_ISSET(sig_fd, &readyfds)) { - if(signal_handle()) { - return_value = 1; + return_value = signal_handle(); + if(return_value == 1) break; + else if(return_value == 2) { + seq_win_clear(&seq_win); + log_printf(NOTICE, "sequence window cleared"); + return_value = 0; } + else + return_value = 0; } if(FD_ISSET(dev->fd_, &readyfds)) { -- cgit v1.2.3