mirror of
https://github.com/linux-msm/cdba.git
synced 2026-02-25 13:11:56 -08:00
cdba: Make inactivity timeout a default
Reverse the logic of inactivity timeout so that by default we set inactivity timeout to 600s. Passing -T 0 disables inactivity timeout completely. Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
This commit is contained in:
committed by
Bjorn Andersson
parent
b996b5eb99
commit
8fa6fc9a2f
7
cdba.c
7
cdba.c
@@ -467,7 +467,7 @@ static void usage(void)
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
bool timeout_on_inactivity = false;
|
||||
bool timeout_on_inactivity = true;
|
||||
struct termios *orig_tios;
|
||||
struct work *next;
|
||||
struct work *work;
|
||||
@@ -481,7 +481,7 @@ int main(int argc, char **argv)
|
||||
char buf[128];
|
||||
fd_set rfds;
|
||||
fd_set wfds;
|
||||
int timeout = 0;
|
||||
int timeout = 600;
|
||||
ssize_t n;
|
||||
int nfds;
|
||||
int opt;
|
||||
@@ -500,10 +500,11 @@ int main(int argc, char **argv)
|
||||
break;
|
||||
case 't':
|
||||
timeout = atoi(optarg);
|
||||
if (timeout == 0)
|
||||
timeout_on_inactivity = false;
|
||||
break;
|
||||
case 'T':
|
||||
timeout = atoi(optarg);
|
||||
timeout_on_inactivity = true;
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
|
||||
Reference in New Issue
Block a user