projects
/
lcr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added 'polling' option to options.conf.
[lcr.git]
/
main.c
diff --git
a/main.c
b/main.c
index
b425abe
..
e2d3f13
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-174,6
+174,7
@@
int main(int argc, char *argv[])
created_lock = 0, created_signal = 0, created_debug = 0,
created_misdn = 0;
char tracetext[256], lock[128];
created_lock = 0, created_signal = 0, created_debug = 0,
created_misdn = 0;
char tracetext[256], lock[128];
+ char options_error[256];
#if 0
/* init fdset */
#if 0
/* init fdset */
@@
-250,7
+251,7
@@
int main(int argc, char *argv[])
}
/* read options */
}
/* read options */
- if (read_options() == 0) {
+ if (read_options(
options_error
) == 0) {
PERROR("%s", options_error);
goto free;
}
PERROR("%s", options_error);
goto free;
}
@@
-459,7
+460,11
@@
int main(int argc, char *argv[])
usleep(10000);
}
#else
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);
#endif
}
SPRINT(tracetext, "%s terminated", NAME);