diff options
author | Lars Roland <Lars.Roland@gmx.net> | 2005-01-07 18:07:18 +0000 |
---|---|---|
committer | Lars Roland <Lars.Roland@gmx.net> | 2005-01-07 18:07:18 +0000 |
commit | 603c9edd8343c5234105cd8eafaedf8059c67f82 (patch) | |
tree | c9cddbda7dae4b962c3cf0ab0c94bf957b3b0c3a /plugins/mate/packet-mate.c | |
parent | 02520bcf9c156a31db609600b395b4af799405a4 (diff) |
From Luis Ontanon:
A new patch for mate
- changed the default config file name to ""
- avoid trying to confgure mate when the config filename is ""
- add filename and line to config errors, that way one can actually
find errors in config files
- teady up the config error strings ( made them uniform )
- fixed a crash when missing index AVPs (Name,For,On etc) in config AVPLS
- make sure we do not delete the config AVPs and AVPLs to avoid
references to unsubscribed strings been left arround
- fixed the len on LoALs
- changed the way loal_from_file reports an error.
- matelib/sip.mate was missing the Name in a PduDef (from Julien Leproust)
- matelib/h225_ras had a wrong field name (from Julien Leproust)
At this point mate is silent when it's not expressely configured by the user.
From me:
reduce compiler noise on MSVC
svn path=/trunk/; revision=12985
Diffstat (limited to 'plugins/mate/packet-mate.c')
-rw-r--r-- | plugins/mate/packet-mate.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/plugins/mate/packet-mate.c b/plugins/mate/packet-mate.c index 92c653c81b..8c7a86e7d3 100644 --- a/plugins/mate/packet-mate.c +++ b/plugins/mate/packet-mate.c @@ -37,7 +37,7 @@ static mate_config* mc = NULL; static int proto_mate = -1; -static char* pref_mate_config_filename = "config.mate"; +static char* pref_mate_config_filename = ""; static proto_item *mate_i = NULL; @@ -259,16 +259,17 @@ extern void proto_reg_handoff_mate(void) { - mc = mate_make_config(pref_mate_config_filename); - - if (mc) { - proto_register_field_array(proto_mate, (hf_register_info*) mc->hfrs->data, mc->hfrs->len ); - proto_register_subtree_array((gint**) mc->ett->data, mc->ett->len); - register_init_routine(init_mate); + if ( *pref_mate_config_filename != '\0' ) { + + mc = mate_make_config(pref_mate_config_filename); + + if (mc) { + proto_register_field_array(proto_mate, (hf_register_info*) mc->hfrs->data, mc->hfrs->len ); + proto_register_subtree_array((gint**) mc->ett->data, mc->ett->len); + register_init_routine(init_mate); + } } - -} - +} extern void |