]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
minor tweaks
authorAlan T. DeKok <aland@freeradius.org>
Sat, 30 Mar 2024 14:09:49 +0000 (10:09 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 30 Mar 2024 22:13:44 +0000 (18:13 -0400)
src/bin/radclient-ng.c

index c6fdff04d92c595c6efe979d39e867831e73b1c8..20a0a07359a6b4f976ef61232cc04910a5ed690a 100644 (file)
@@ -907,8 +907,8 @@ static int recv_one_packet(fr_time_delta_t wait_time)
        fd_set                  set;
        fr_time_delta_t         our_wait_time;
        rc_request_t            *request;
-       fr_packet_t     *reply, *packet;
-       volatile int            max_fd;
+       fr_packet_t             *reply, *packet;
+       int                     max_fd;
 
 #ifdef STATIC_ANALYZER
        if (!secret) fr_exit_now(1);
@@ -1114,7 +1114,7 @@ int main(int argc, char **argv)
                .path = NULL,
                .filename = NULL,
 
-               .async = true,
+               .async = false,
        };
 
 
@@ -1396,6 +1396,11 @@ int main(int argc, char **argv)
                fr_exit_now(1);
        }
 
+       if (fr_bio_fd_connect(bio) < 0) {
+               ERROR("Failed connecting socket: %s", fr_strerror());
+               fr_exit_now(1);
+       }
+
        fd_info = fr_bio_fd_info(bio);
        fr_assert(fd_info != NULL);