audiod: kill close_writer()
[paraslash.git] / server.c
index 6f70d977d0814e0c7fa5a54581baf405397ea259..1805c92b62de84d7131bf71c905dc3d8d23a0d93 100644 (file)
--- a/server.c
+++ b/server.c
@@ -33,6 +33,7 @@
 #include "db.h"
 #include "server.h"
 #include "afs.h"
 #include "db.h"
 #include "server.h"
 #include "afs.h"
+#include "afh.h" /* FIXME */
 #include "config.h"
 #include "close_on_fork.h"
 #include "send.h"
 #include "config.h"
 #include "close_on_fork.h"
 #include "send.h"
@@ -61,7 +62,6 @@ char *user_list = NULL;
 extern void dccp_send_init(struct sender *);
 extern void http_send_init(struct sender *);
 extern void ortp_send_init(struct sender *);
 extern void dccp_send_init(struct sender *);
 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 */
 
 /* TODO: This is better handled by autoconf */
 /** the list of supported audio file selectors */
@@ -450,10 +450,7 @@ repeat:
                        continue;
                if (!senders[i].pre_select)
                        continue;
                        continue;
                if (!senders[i].pre_select)
                        continue;
-               senders[i].pre_select(mmd->audio_format >= 0?
-                       &afl[mmd->audio_format] : NULL,
-                       &max_fileno,
-                       &rfds, &wfds);
+               senders[i].pre_select( &max_fileno, &rfds, &wfds);
        }
        if (selectors[mmd->selector_num].pre_select) {
                ret = selectors[mmd->selector_num].pre_select(&rfds, &wfds);
        }
        if (selectors[mmd->selector_num].pre_select) {
                ret = selectors[mmd->selector_num].pre_select(&rfds, &wfds);
@@ -473,14 +470,10 @@ repeat:
                        continue;
                if (!senders[i].post_select)
                        continue;
                        continue;
                if (!senders[i].post_select)
                        continue;
-               senders[i].post_select(mmd->audio_format >= 0?
-                       &afl[mmd->audio_format] : NULL,
-                       &rfds, &wfds);
-       }
-       if (!ret) {
-               afs_send_chunk();
-               status_refresh();
+               senders[i].post_select(&rfds, &wfds);
        }
        }
+       afs_send_chunk();
+       status_refresh();
        if (FD_ISSET(signal_pipe, &rfds)) {
                int sig;
                sig = para_next_signal();
        if (FD_ISSET(signal_pipe, &rfds)) {
                int sig;
                sig = para_next_signal();