]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
"open" shouldn't be called for connections
authorAlan T. DeKok <aland@freeradius.org>
Fri, 21 Sep 2018 17:33:56 +0000 (13:33 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 21 Sep 2018 17:33:56 +0000 (13:33 -0400)
src/lib/io/master.c

index d0565ba8b64920cb0118abc432a41e92dbde3ca4..2180ca63048c963cc489ccacb7152151da64fe16 100644 (file)
@@ -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;
 }