activate_inactive_grab_clients(slot_num, s->format, s->fc);
}
-#if 0
-static void rn_event_handler(struct task *t)
-{
- struct receiver_node *rn = t->private_data;
- int i;
-
- PARA_NOTICE_LOG("%s\n", para_strerror(-t->ret));
- unregister_task(t);
- rn->error = t->ret;
- /* set restart barrier */
- FOR_EACH_SLOT(i) {
- struct timeval restart_delay = {0, 10 * 1000};
- if (slot[i].receiver_node != rn)
- continue;
- if (rn->error != -E_RECV_EOF)
- /* don't reconnect immediately on errors */
- restart_delay.tv_sec = 5;
- tv_add(now, &restart_delay, &afi[slot[i].format].restart_barrier);
- }
-}
-#endif
-
static int open_receiver(int format)
{
struct audio_format_info *a = &afi[format];
struct slot_info *s;
int ret, slot_num;
struct receiver_node *rn;
- const struct timeval restart_delay = {1, 0};
+ const struct timeval restart_delay = {2, 0};
ret = get_empty_slot();
if (ret < 0)
rn->task.post_select = a->receiver->post_select;
sprintf(rn->task.status, "%s receiver node", rn->receiver->name);
register_task(&rn->task);
- return 1;
+ ret = 1;
err:
- PARA_ERROR_LOG("%s\n", para_strerror(-ret));
+ if (ret < 0)
+ PARA_ERROR_LOG("%s\n", para_strerror(-ret));
tv_add(now, &restart_delay, &afi[format].restart_barrier);
return ret;
}