two fixes in config loading:
authorlego <lego@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 18 Feb 2005 18:40:25 +0000 (18:40 +0000)
committerlego <lego@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 18 Feb 2005 18:40:25 +0000 (18:40 +0000)
  - do not accept GopDefs for non existent pdus Pdu
  - GogExtra "no For" instead of "no Name"

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13422 f5534014-38df-0310-8fa8-9805f1628bb7

plugins/mate/mate_setup.c

index 055b12fd730c9c78292988c54a86577f00160f80..4b8ad3504ae7f67f38008b1119d8ad2557ae1725 100644 (file)
@@ -733,6 +733,11 @@ static gboolean config_gop(AVPL* avpl) {
                report_error("MATE: GopDef: no On in: %s",avpl->name);
                return FALSE;
        }
                report_error("MATE: GopDef: no On in: %s",avpl->name);
                return FALSE;
        }
+       
+       if (g_hash_table_lookup(matecfg->pducfgs,on) == NULL ) {
+               report_error("MATE: GopDef: Pdu '%s' does not exist in: %s",on,avpl->name);
+               return FALSE;           
+       }
 
        if (g_hash_table_lookup(matecfg->gops_by_pduname,on) ) {
                report_error("MATE: GopDef: Gop for Pdu '%s' exists already in: %s",on,avpl->name);
 
        if (g_hash_table_lookup(matecfg->gops_by_pduname,on) ) {
                report_error("MATE: GopDef: Gop for Pdu '%s' exists already in: %s",on,avpl->name);
@@ -859,7 +864,7 @@ static gboolean config_gogkey(AVPL* avpl) {
 
        if ( ! name || ! cfg ) {
                if ( ! name )
 
        if ( ! name || ! cfg ) {
                if ( ! name )
-                       report_error("MATE: GogKey: no Name in %s",avpl->name);
+                       report_error("MATE: GogKey: no For in %s",avpl->name);
                else
                        report_error("MATE: GogKey: no such Gop '%s' in %s",name,avpl->name);
 
                else
                        report_error("MATE: GogKey: no such Gop '%s' in %s",name,avpl->name);