Changeset 11 for trunk/dnsbl/DNSBL.pm
- Timestamp:
- 01/06/10 13:09:31 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dnsbl/DNSBL.pm
r10 r11 206 206 my $block = new NetAddr::IP "$blockin"; # need this to clean up messes like ranges. sigh. 207 207 208 return "$blockin not a single CIDR range" if !$block; 209 208 210 local $dbh->{AutoCommit} = 1; # force autocommit 209 211 210 212 my $sth = $dbh->prepare("INSERT INTO blocks (block,orgid,level) VALUES (?,?,?)"); 211 213 $sth->execute("$block",$orgid,$level); 214 return $sth->errstr if $sth->err; 212 215 # nb: no need to return anything, since the CIDR block is the key 213 216 }
Note:
See TracChangeset
for help on using the changeset viewer.