summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--default/options.conf3
-rw-r--r--main.c6
-rw-r--r--options.c6
-rw-r--r--options.h1
-rw-r--r--todo.txt2
5 files changed, 15 insertions, 3 deletions
diff --git a/default/options.conf b/default/options.conf
index 64d0f27..e0e93a0 100644
--- a/default/options.conf
+++ b/default/options.conf
@@ -117,3 +117,6 @@
#
#gsm
+# Enable polling in main loop.
+# This feature is temporarily for test purpose. Don't enable it
+#polling
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);
diff --git a/options.c b/options.c
index 1cadbe5..88f6424 100644
--- a/options.c
+++ b/options.c
@@ -35,7 +35,8 @@ struct options options = {
0700, /* rights of lcr admin socket */
-1, /* socket user (-1= no change) */
-1, /* socket group (-1= no change) */
- 0 /* enable gsm */
+ 0, /* enable gsm */
+ 1 /* use polling of main loop */
};
char options_error[256];
@@ -235,6 +236,9 @@ int read_options(char *options_error)
} else
if (!strcmp(option,"gsm")) {
options.gsm = 1;
+ } else
+ if (!strcmp(option,"polling")) {
+ options.polling = 1;
} else {
UPRINT(options_error, "Error in %s (line %d): wrong option keyword %s.\n", filename,line,option);
goto error;
diff --git a/options.h b/options.h
index 1a256e2..c13ee2c 100644
--- a/options.h
+++ b/options.h
@@ -30,6 +30,7 @@ struct options {
int socketuser; /* socket chown to this user */
int socketgroup; /* socket chgrp to this group */
int gsm; /* enable gsm support */
+ int polling;
};
extern struct options options;
diff --git a/todo.txt b/todo.txt
index c6b6993..896a0d0 100644
--- a/todo.txt
+++ b/todo.txt
@@ -15,5 +15,5 @@ doku:
- neuen partyline-param dokumentieren
- aufzeichnung der ansage mit 0 ohne beep beenden
- gain, pipeline, crypt
-
+- polling