Ethereal-dev: [Ethereal-dev] patch for main.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

Date: Thu, 3 Jul 2003 20:08:27 +0200 (MEST)
Hello,

attached is a small patch for main.c.
It fixes a bug in the about menu.
Ethereal always showed "Running without WinPcap" although WinPcap was
loaded.
tethereal -v does it right. 

best regards, 

Lars
Index: ethereal/gtk/main.c
===================================================================
RCS file: /cvsroot/ethereal/gtk/main.c,v
retrieving revision 1.298
diff -u -r1.298 main.c
--- ethereal/gtk/main.c	22 Jun 2003 16:07:23 -0000	1.298
+++ ethereal/gtk/main.c	3 Jul 2003 17:05:23 -0000
@@ -1647,6 +1647,14 @@
 
   init_cap_file(&cfile);
 
+#ifdef WIN32
+  /* Load wpcap if possible. Do this before collecting the run-time version information */
+  load_wpcap();
+
+  /* Start windows sockets */
+  WSAStartup( MAKEWORD( 1, 1 ), &wsaData );
+#endif  /* WIN32 */
+
   /* Assemble the compile-time version information string */
   comp_info_str = g_string_new("Compiled ");
   g_string_append(comp_info_str, "with ");
@@ -1963,14 +1971,6 @@
   }
 #endif
 
-#ifdef WIN32
-  /* Load wpcap if possible */
-  load_wpcap();
-
-  /* Start windows sockets */
-  WSAStartup( MAKEWORD( 1, 1 ), &wsaData );
-#endif  /* WIN32 */
-
   /* Notify all registered modules that have had any of their preferences
      changed either from one of the preferences file or from the command
      line that their preferences have changed. */