From: Alan T. DeKok Date: Fri, 21 Sep 2018 17:33:56 +0000 (-0400) Subject: "open" shouldn't be called for connections X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fbc66d9b6b2a03c415b0bfa80c8fc415b1a099f2;p=thirdparty%2Ffreeradius-server.git "open" shouldn't be called for connections --- diff --git a/src/lib/io/master.c b/src/lib/io/master.c index d0565ba8b64..2180ca63048 100644 --- a/src/lib/io/master.c +++ b/src/lib/io/master.c @@ -1569,23 +1569,14 @@ static int mod_inject(fr_listen_t *li, uint8_t *buffer, size_t buffer_len, fr_ti 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; }