Changeset 687 for trunk/dns-rpc.cgi
- Timestamp:
- 08/19/15 17:42:17 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns-rpc.cgi
r686 r687 198 198 _commoncheck(\%args, 'y'); 199 199 200 my ($code, $msg) = $dnsdb->addDomain($args{domain}, $args{group}, $args{state}, $args{ location});200 my ($code, $msg) = $dnsdb->addDomain($args{domain}, $args{group}, $args{state}, $args{defloc}); 201 201 die "$msg\n" if $code eq 'FAIL'; 202 202 return $msg; # domain ID … … 208 208 _commoncheck(\%args, 'y'); 209 209 die "Need forward/reverse zone flag\n" if !$args{revrec}; 210 die "Need zone identifier\n" if !$args{zone}; 210 211 211 212 my ($code,$msg); … … 222 223 die "$msg\n" if $code eq 'FAIL'; 223 224 return $msg; 224 } 225 } # delZone() 225 226 226 227 #sub domainName {} … … 246 247 my ($code, $msg) = $dnsdb->addRDNS($args{revzone}, $args{revpatt}, $args{group}, $args{state}, $args{defloc}); 247 248 die "$msg\n" if $code eq 'FAIL'; 248 return $msg; # domainID249 return $msg; # zone ID 249 250 } 250 251 … … 469 470 } 470 471 472 # The core sub uses references for some arguments to allow limited modification for 473 # normalization or type+zone matching/mapping/availability. 471 474 sub rpc_addRec { 472 475 my %args = @_; … … 835 838 _reccheck(\%args); 836 839 837 my ($code, $msg) = $dnsdb->delRec($args{defrec}, $args{re crev}, $args{id});840 my ($code, $msg) = $dnsdb->delRec($args{defrec}, $args{revrec}, $args{id}); 838 841 839 842 die "$msg\n" if $code eq 'FAIL'; … … 849 852 # unless the caller explicitly requested 'yes' 850 853 $args{delsubs} = 0 if $args{delsubs} ne 'y'; 854 855 # Don't delete the A component of an A+PTR by default 856 $args{delforward} = 0 if !$args{delforward}; 851 857 852 858 # much like addOrUpdateRevRec() … … 1015 1021 _commoncheck(\%args, 'y'); 1016 1022 1017 my @arglist = ($args{zoneid}); 1023 $args{reverse} = 'n' if !$args{reverse} || $args{reverse} ne 'y'; 1024 my @arglist = ($args{zoneid}, $args{reverse}); 1018 1025 push @arglist, $args{status} if defined($args{status}); 1019 1026
Note:
See TracChangeset
for help on using the changeset viewer.