ortp_send: kill useless gettimeofday()
[paraslash.git] / server.c
index e10c1e0343c77f1462bb7117b38486f39161411f..6f70d977d0814e0c7fa5a54581baf405397ea259 100644 (file)
--- a/server.c
+++ b/server.c
@@ -63,6 +63,7 @@ extern void http_send_init(struct sender *);
 extern void ortp_send_init(struct sender *);
 extern struct audio_format afl[];
 
+/* TODO: This is better handled by autoconf */
 /** the list of supported audio file selectors */
 struct audio_file_selector selectors[] = {
        {
@@ -436,14 +437,12 @@ int main(int argc, char *argv[])
        valid_fd_012();
        sockfd = do_inits(argc, argv);
 repeat:
-       /* check socket and signal pipe in any case */
        FD_ZERO(&rfds);
        FD_ZERO(&wfds);
-       FD_SET(sockfd, &rfds);
-       max_fileno = sockfd;
-       FD_SET(signal_pipe, &rfds);
-       max_fileno = PARA_MAX(max_fileno, signal_pipe);
-
+       max_fileno = -1;
+       /* check socket and signal pipe in any case */
+       para_fd_set(sockfd, &rfds, &max_fileno);
+       para_fd_set(signal_pipe, &rfds, &max_fileno);
        timeout = afs_preselect();
        status_refresh();
        for (i = 0; senders[i].name; i++) {