{
struct receiver_node *rn = container_of(t, struct receiver_node, task);
struct private_http_recv_data *phd = rn->private_data;
+ int ret;
+ if (rn->btrn) {
+ ret = generic_recv_pre_select(s, t);
+ if (ret <= 0)
+ return;
+ }
t->error = 0;
if (phd->status == HTTP_CONNECTED)
para_fd_set(phd->fd, &s->wfds, &s->max_fileno);
void recv_init(void);
void *check_receiver_arg(char *ra, int *receiver_num);
void print_receiver_helps(int detailed);
+int generic_recv_pre_select(struct sched *s, struct task *t);
/** \file recv_common.c common functions of para_recv and para_audiod */
#include <regex.h>
+#include <stdbool.h>
#include "para.h"
#include "list.h"
#include "ggo.h"
#include "recv.h"
#include "string.h"
+#include "buffer_tree.h"
DEFINE_RECEIVER_ARRAY;
ggo_print_help(&r->help, detailed);
}
}
+
+int generic_recv_pre_select(struct sched *s, struct task *t)
+{
+ struct receiver_node *rn = container_of(t, struct receiver_node, task);
+ int ret = btr_node_status(rn->btrn, 0, BTR_NT_ROOT);
+
+ t->error = 0;
+ if (ret < 0) {
+ s->timeout.tv_sec = 0;
+ s->timeout.tv_usec = 1;
+ }
+ return ret;
+}