/** the file containing user information (public key, permissions) */
char *user_list_file = NULL;
-extern void dccp_send_init(struct sender *);
-extern void http_send_init(struct sender *);
-extern void ortp_send_init(struct sender *);
-
-/** the list of supported senders */
-struct sender senders[] = {
- {
- .name = "http",
- .init = http_send_init,
- },
- {
- .name = "dccp",
- .init = dccp_send_init,
- },
-#ifdef HAVE_ORTP
- {
- .name = "ortp",
- .init = ortp_send_init,
- },
-#endif
- {
- .name = NULL,
- }
-};
-
-
/* global variables for server-internal use */
static FILE *logfile;
static int mmd_mutex, mmd_shm_id;
}
}
+static int server_select(int max_fileno, fd_set *readfds, fd_set *writefds,
+ struct timeval *timeout_tv)
+{
+ int ret;
+
+ status_refresh();
+ mmd_unlock();
+ ret = para_select(max_fileno + 1, readfds, writefds, timeout_tv);
+ mmd_lock();
+ return ret;
+}
+
/**
* the main function of para_server
*
para_fd_set(sockfd, &rfds, &max_fileno);
para_fd_set(signal_pipe, &rfds, &max_fileno);
timeout = vss_preselect(&rfds, &wfds, &max_fileno);
- status_refresh();
- mmd_unlock();
- ret = para_select(max_fileno + 1, &rfds, &wfds, timeout);
- mmd_lock();
- if (ret < 0)
- goto repeat;
+ server_select(max_fileno + 1, &rfds, &wfds, timeout);
vss_post_select(&rfds, &wfds);
- status_refresh();
if (FD_ISSET(signal_pipe, &rfds)) {
int sig;
pid_t pid;