Navigation


Changeset 1465:2f65b828eced in freeDiameter


Ignore:
Timestamp:
Mar 10, 2020, 7:50:10 AM (2 years ago)
Author:
Luke Mewburn <luke@mewburn.net>
Branch:
default
Phase:
public
Message:

org_to_fd: add QoSFilterRule. improve error handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • contrib/tools/org_to_fd.pl

    r1459 r1465  
    2525
    2626    return "AVP_TYPE_GROUPED" if ($type =~ m/Grouped/);
    27     return "AVP_TYPE_OCTETSTRING" if ($type =~ m/(Address|DiameterIdentity|DiameterURI|OctetString|IPFilterRule|Time|UTF8String)/);
     27    return "AVP_TYPE_OCTETSTRING" if ($type =~ m/(Address|DiameterIdentity|DiameterURI|OctetString|IPFilterRule|Time|UTF8String|QoSFilterRule)/);
    2828    return "AVP_TYPE_INTEGER32" if ($type =~ m/Enumerated|Integer32/);
    2929    return "AVP_TYPE_INTEGER64" if ($type =~ m/Integer64/);
     
    3333    return "AVP_TYPE_FLOAT64" if ($type =~ m/Float64/);
    3434
    35     return "UNKNOWN TYPE: $type";
     35    die("unknown type '$type'");
    3636}
    3737
     
    6868
    6969sub usage($) {
    70     die(sprintf("usage: %s [-V vendor_name] [-v vendor_code] [file ...]\n", $progname));
    71     exit(@_);
     70    print STDERR "usage: $progname [-V vendor_name] [-v vendor_code] [file ...]\n";
     71    exit(1);
    7272}
    7373
     
    8686print_comment("");
    8787print_comment("The following is created automatically with:");
    88 print_comment(sprintf("    org_to_fd.pl -V '%s' -v %s", $vendor_name, $vendor));
     88print_comment("    org_to_fd.pl -V '$vendor_name' -v $vendor");
    8989print_comment("Changes will be lost during the next update.");
    9090print_comment("Do not modify; modify the source .org file instead.");
     
    106106
    107107    if ($name =~ m/\s/) {
    108         die(sprintf("name '%s' contains space", $name));
     108        die("name '$name' contains space");
    109109    }
    110110
Note: See TracChangeset for help on using the changeset viewer.