static int mod_open(fr_listen_t *li)
{
fr_io_instance_t *inst;
- fr_io_connection_t *connection;
- fr_listen_t *child;
- int rcode;
-
- get_inst(li->thread_instance, &inst, &connection, &child);
- /*
- * One connection can't open another one.
- */
- rad_assert(connection == NULL);
+ inst = li->thread_instance;
- rcode = inst->app_io->open(child);
- if (rcode < 0) return rcode;
+ if (inst->app_io->open(inst->child) < 0) return -1;
- li->fd = child->fd; /* copy this back up */
+ li->fd = inst->child->fd; /* copy this back up */
- return rcode;
+ return 0;
}