diff options
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | doc/ethereal.pod | 2 | ||||
-rw-r--r-- | packet-diameter.c | 22 |
3 files changed, 19 insertions, 6 deletions
@@ -1909,6 +1909,7 @@ And assorted fixes and enhancements by the people listed above and by: Aki Immonen <aki.immonen [AT] golftalma.fi> Ian Schorr <ischorr [AT] comcast.net> David E. Weekly <david [AT] weekly.org> + Steve Ford <sford [AT] geeky-boy.com> Alain Magloire <alainm[AT]rcsm.ece.mcgill.ca> was kind enough to give his permission to use his version of snprintf.c. diff --git a/doc/ethereal.pod b/doc/ethereal.pod index ed908dbc36..3a3dd548b4 100644 --- a/doc/ethereal.pod +++ b/doc/ethereal.pod @@ -1965,7 +1965,7 @@ B<http://www.ethereal.com>. Aki Immonen <aki.immonen [AT] golftalma.fi> Ian Schorr <ischorr [AT] comcast.net> David E. Weekly <david [AT] weekly.org> - Baktha Muralitharan <muralidb [AT] cisco.com> + Steve Ford <sford [AT] geeky-boy.com> Alain Magloire <alainm[AT]rcsm.ece.mcgill.ca> was kind enough to give his permission to use his version of snprintf.c. diff --git a/packet-diameter.c b/packet-diameter.c index afcaf8cf0f..4963ea6dac 100644 --- a/packet-diameter.c +++ b/packet-diameter.c @@ -1,7 +1,7 @@ /* packet-diameter.c * Routines for Diameter packet disassembly * - * $Id: packet-diameter.c,v 1.55 2003/07/09 05:37:47 tpot Exp $ + * $Id: packet-diameter.c,v 1.56 2003/10/29 21:19:44 guy Exp $ * * Copyright (c) 2001 by David Frascone <dave@frascone.com> * @@ -210,7 +210,7 @@ static int gbl_diameterSctpPort=SCTP_PORT_DIAMETER; static gboolean gbl_diameter_desegment = TRUE; #define DICT_FN "diameter/dictionary.xml" -static gchar *gbl_diameterDictionary = NULL; +static gchar *gbl_diameterDictionary; typedef struct _e_diameterhdr { guint32 versionLength; @@ -1870,6 +1870,7 @@ proto_register_diameter(void) &ett_diameter_avpinfo }; module_t *diameter_module; + gchar *default_diameterDictionary; proto_diameter = proto_register_protocol ("Diameter Protocol", "Diameter", "diameter"); proto_register_field_array(proto_diameter, hf, array_length(hf)); @@ -1891,14 +1892,25 @@ proto_register_diameter(void) /* * Build our default dictionary filename */ - if (! gbl_diameterDictionary) - gbl_diameterDictionary = get_datafile_path(DICT_FN); - /* Now register its preferences so it can be changed. */ + default_diameterDictionary = get_datafile_path(DICT_FN); + + /* + * Now register the dictionary filename as a preference, + * so it can be changed. + */ + gbl_diameterDictionary = default_diameterDictionary; prefs_register_string_preference(diameter_module, "dictionary.name", "Diameter XML Dictionary", "Set the dictionary used for Diameter messages", &gbl_diameterDictionary); + /* + * We don't need the default dictionary, so free it (a copy was made + * of it in "gbl_diameterDictionary" by + * "prefs_register_string_preference()"). + */ + g_free(default_diameterDictionary); + /* Desegmentation */ prefs_register_bool_preference(diameter_module, "desegment", "Desegment all Diameter messages spanning multiple TCP segments", |