]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
make dnspcap spit out the filename on error
authorPieter Lexis <pieter.lexis@powerdns.com>
Fri, 29 Apr 2016 14:52:20 +0000 (16:52 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Fri, 29 Apr 2016 14:52:20 +0000 (16:52 +0200)
pdns/dnspcap.cc

index 3366e70a9ae8396e8e39b2cff9d579866d8ea1c4..d69244e8293972dce392fe82586ef91b179641cd 100644 (file)
@@ -11,7 +11,7 @@ PcapPacketReader::PcapPacketReader(const string& fname) : d_fname(fname)
 {
   d_fp=fopen(fname.c_str(),"r");
   if(!d_fp)
-    unixDie("Unable to open file");
+    unixDie("Unable to open file " + fname);
   
   int flags=fcntl(fileno(d_fp),F_GETFL,0);
   fcntl(fileno(d_fp), F_SETFL,flags&(~O_NONBLOCK)); // bsd needs this in stdin (??)