Ignore:
Timestamp:
04/13/16 18:16:46 (8 years ago)
Author:
Kris Deugau
Message:

/trunk

Update syslog and mailNotify() calls to better match the new data
structures, and normalize their formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/ipdb-rpc.cgi

    r850 r851  
    267267    die "Pool ID or VRF is required\n" if !$args{parent} && !$args{vrf};
    268268    ($args{block}) = $ip_dbh->selectrow_array(
    269        "SELECT id FROM poolips WHERE ip = ? AND ".($args{parent} ? "parent_id = ?" : "vrf = ?"),
    270        undef, $args{block}, ($args{parent} ? $args{parent} : $args{vrf}) );
     269        "SELECT id FROM poolips WHERE ip = ? AND ".($args{parent} ? "parent_id = ?" : "vrf = ?"),
     270        undef, $args{block}, ($args{parent} ? $args{parent} : $args{vrf}) );
    271271  }
    272272
     
    275275  # set assignIP_on_update to simplify some calling situations.  better to use allocateBlock if possible though.
    276276  my ($code,$msg) = updateBlock($ip_dbh, %args, assignIP_on_update => 1);
    277 
    278277  if ($code eq 'FAIL') {
    279     syslog "err", "$args{rpcsystem}/$args{rpcuser} could not update block/IP ID $args{block}: '$msg'";
     278    syslog "err", "$args{rpcsystem}/$args{rpcuser} could not update block/IP $args{block} ($binfo->{block}): '$msg'";
    280279    die "$msg\n";
    281280  }
    282 
    283   syslog "notice", "$authuser updated $args{block}";
     281  syslog "notice", "$args{rpcsystem}/$args{rpcuser} updated $args{block} ($binfo->{block})";
    284282
    285283  return $msg;
    286 
    287284} # rpc_updateBlock()
    288285
Note: See TracChangeset for help on using the changeset viewer.