Ethereal-dev: [Ethereal-dev] Trivial enhancement for GIOP dissector

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

From: "W. Borgert" <debacle@xxxxxxxxxx>
Date: Tue, 18 Apr 2006 06:31:35 +0000
Currently, the filename IOR.txt is hardcoded into ethereal.
The patch allows the user to change it. Thanks for applying!

diff -uraN ethereal.orig/epan/dissectors/packet-giop.c ethereal/epan/dissectors/packet-giop.c
--- ethereal.orig/epan/dissectors/packet-giop.c	2006-04-18 06:12:55.000000000 +0000
+++ ethereal/epan/dissectors/packet-giop.c	2006-04-18 06:23:24.000000000 +0000
@@ -790,6 +790,7 @@
 
 
 gboolean giop_desegment = TRUE;
+static const char *giop_ior_file = "IOR.txt";
 
 /*
  * ------------------------------------------------------------------------------------------+
@@ -1391,7 +1392,7 @@
   giop_complete_reply_hash = g_hash_table_new(complete_reply_hash_fn, complete_reply_equal_fn);
 
 
-  read_IOR_strings_from_file("IOR.txt", 600); /* testing */
+  read_IOR_strings_from_file(giop_ior_file, 600);
 
 
 }
@@ -4312,6 +4313,8 @@
     "Whether the GIOP dissector should reassemble messages spanning multiple TCP segments."
     " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.",
     &giop_desegment);
+  prefs_register_string_preference(giop_module, "ior_txt", "Stringified IORs",
+    "File containing stringified IORs, one per line.", &giop_ior_file);
 
   /*
    * Init the giop user module hash tables here, as giop users