]> The Tcpdump Group git mirrors - libpcap/commitdiff
Initialize most of the pars structure before we use it.
authorGuy Harris <[email protected]>
Tue, 8 Jan 2019 10:00:05 +0000 (02:00 -0800)
committerGuy Harris <[email protected]>
Wed, 9 Jan 2019 02:45:41 +0000 (18:45 -0800)
rpcapd/daemon.c

index 88c72b96f5c0104e6cb1c62ca1f743817df3b1f4..90bc0cc6dc43297bdb0c00cea0a6c26add1638dd 100644 (file)
@@ -194,6 +194,13 @@ daemon_serviceloop(SOCKET sockctrl_in, SOCKET sockctrl_out,
 
        *errbuf = 0;    // Initialize errbuf
 
+       // Set parameters structure
+       pars.sockctrl_in = sockctrl_in;
+       pars.sockctrl_out = sockctrl_out;
+       pars.protocol_version = 0;              // not yet known
+       pars.isactive = isactive;               // active mode
+       pars.nullAuthAllowed = nullAuthAllowed;
+
 #ifdef HAVE_OPENSSL
        //
        // We have to upgrade to TLS as soon as possible, so that the
@@ -215,14 +222,7 @@ daemon_serviceloop(SOCKET sockctrl_in, SOCKET sockctrl_out,
                }
        }
 #endif
-
-       // Set parameters structure
-       pars.sockctrl_in = sockctrl_in;
-       pars.sockctrl_out = sockctrl_out;
        pars.ssl = ssl;
-       pars.protocol_version = 0;              // not yet known
-       pars.isactive = isactive;               // active mode
-       pars.nullAuthAllowed = nullAuthAllowed;
 
        //
        // We have a connection.