MT#8547 Fix handling of special prefs.

changes/94/294/1
Andreas Granig 11 years ago
parent be8cad19bb
commit a99f707522

@ -70,6 +70,7 @@ sub get_resource {
my $resource; my $resource;
foreach my $pref($prefs->all) { foreach my $pref($prefs->all) {
my $value; my $value;
my $processed = 0;
SWITCH: for ($pref->attribute->attribute) { SWITCH: for ($pref->attribute->attribute) {
/^rewrite_calle[re]_(in|out)_dpid$/ && do { /^rewrite_calle[re]_(in|out)_dpid$/ && do {
@ -85,8 +86,7 @@ sub get_resource {
$c->log->error("no rewrite rule set for '".$pref->attribute->attribute."' with value '".$pref->value."' found, altough it's stored in preference id ".$pref->id); $c->log->error("no rewrite rule set for '".$pref->attribute->attribute."' with value '".$pref->value."' found, altough it's stored in preference id ".$pref->id);
# let it slip through # let it slip through
} }
next; $processed = 1;
# TODO: HAL link to rewrite rule set? Also/instead set id?
last SWITCH; last SWITCH;
}; };
/^(adm_)?ncos_id$/ && do { /^(adm_)?ncos_id$/ && do {
@ -101,8 +101,7 @@ sub get_resource {
$c->log->error("no ncos level for '".$pref->attribute->attribute."' with value '".$pref->value."' found, altough it's stored in preference id ".$pref->id); $c->log->error("no ncos level for '".$pref->attribute->attribute."' with value '".$pref->value."' found, altough it's stored in preference id ".$pref->id);
# let it slip through # let it slip through
} }
next; $processed = 1;
# TODO: HAL link to rewrite rule set? Also/instead set id?
last SWITCH; last SWITCH;
}; };
/^(contract_)?sound_set$/ && do { /^(contract_)?sound_set$/ && do {
@ -116,8 +115,7 @@ sub get_resource {
$c->log->error("no sound set for '".$pref->attribute->attribute."' with value '".$pref->value."' found, altough it's stored in preference id ".$pref->id); $c->log->error("no sound set for '".$pref->attribute->attribute."' with value '".$pref->value."' found, altough it's stored in preference id ".$pref->id);
# let it slip through # let it slip through
} }
next; $processed = 1;
# TODO: HAL link to rewrite rule set? Also/instead set id?
last SWITCH; last SWITCH;
}; };
/^(man_)?allowed_ips_grp$/ && do { /^(man_)?allowed_ips_grp$/ && do {
@ -133,14 +131,15 @@ sub get_resource {
unless exists($resource->{$pref_name}); unless exists($resource->{$pref_name});
push @{ $resource->{$pref_name} }, $set->ipnet; push @{ $resource->{$pref_name} }, $set->ipnet;
} }
next; $processed = 1;
last SWITCH; last SWITCH;
}; };
# default # default
if($pref->attribute->internal != 0) { if($pref->attribute->internal != 0) {
next; last SWITCH;
} }
} # SWITCH } # SWITCH
next if $processed;
SWITCH: for ($pref->attribute->data_type) { SWITCH: for ($pref->attribute->data_type) {
/^int$/ && do { /^int$/ && do {

Loading…
Cancel
Save