Fix compilation of extcap programs with NMake
[metze/wireshark/wip.git] / wireshark-qt.cpp
index c1382c967cf2b584277987dcb9a7a7032971e824..d4441e2c555cedf8469fbb457debfa83b1606913 100644 (file)
 #include <codecs/codecs.h>
 #endif
 
+#ifdef HAVE_EXTCAP
+#include <extcap.h>
+#endif
+
 /* general (not Qt specific) */
 #include "file.h"
 #include "epan/color_filters.h"
@@ -839,6 +843,10 @@ int main(int argc, char *argv[])
     register_all_plugin_tap_listeners();
 #endif
 
+#ifdef HAVE_EXTCAP
+    extcap_register_preferences();
+#endif
+
     register_all_tap_listeners();
     conversation_table_set_gui_info(init_conversation_table);
     hostlist_table_set_gui_info(init_endpoint_table);
@@ -1354,7 +1362,7 @@ int main(int argc, char *argv[])
 
 ////////
     gchar* err_msg = NULL;
-    if (!color_filters_init(&err_msg, initialize_color, color_filter_add_cb)) {
+    if (!color_filters_init(&err_msg, color_filter_add_cb)) {
         simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_msg);
         g_free(err_msg);
     }
@@ -1402,8 +1410,8 @@ int main(int argc, char *argv[])
             if (global_capture_opts.save_file != NULL) {
                 /* Save the directory name for future file dialogs. */
                 /* (get_dirname overwrites filename) */
-                gchar *s = get_dirname(g_strdup(global_capture_opts.save_file));
-                set_last_open_dir(s);
+                gchar *s = g_strdup(global_capture_opts.save_file);
+                set_last_open_dir(get_dirname(s));
                 g_free(s);
             }
             /* "-k" was specified; start a capture. */