summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorAndreas Eversberg2010-03-17 10:43:04 +0100
committerAndreas Eversberg2010-03-17 10:43:04 +0100
commit882882e0e2f6c451c4b9a5aa8209aa60352049c9 (patch)
tree61c89cd1dffcbf509440c2174bdd6e6bbab1db8a /main.c
parentFixed output problems of error messages while parsing options.conf / gsm.conf. (diff)
downloadlcr-882882e0e2f6c451c4b9a5aa8209aa60352049c9.tar.gz
lcr-882882e0e2f6c451c4b9a5aa8209aa60352049c9.tar.xz
lcr-882882e0e2f6c451c4b9a5aa8209aa60352049c9.zip
Added 'polling' option to options.conf.
This is usefull to test if select loop causes problems and does not wake when it is required. If lcr seems not to wake up, try using 'polling' to disable select timer and use polling instead.
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/main.c b/main.c
index 9d7f834..e2d3f13 100644
--- a/main.c
+++ b/main.c
@@ -460,7 +460,11 @@ int main(int argc, char *argv[])
usleep(10000);
}
#else
- select_main(0, NULL, NULL, NULL);
+ if (options.polling)
+ if (!select_main(1, NULL, NULL, NULL))
+ usleep(10000);
+ else
+ select_main(0, NULL, NULL, NULL);
#endif
}
SPRINT(tracetext, "%s terminated", NAME);