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 */
/* query available isdn ports */
if (!(strcasecmp(argv[1],"query"))) {
+ int rc;
fprintf(stderr, "-> Using 'misdn_info'\n");
- system("misdn_info");
+ rc = system("misdn_info");
ret = 0;
goto free;
}
/* read options */
- if (read_options() == 0) {
+ if (read_options(options_error) == 0) {
PERROR("%s", options_error);
goto free;
}
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);