Debug: socket details
[exim.git] / src / src / malware.c
index 5ed469f3086bdfddb93bb189a0915a211d411192..7ed4d358d983db82c30c7efd0d9f1c89c67f8f27 100644 (file)
@@ -262,6 +262,7 @@ static inline int
 m_panic_defer_3(struct scan * scanent, const uschar * hostport,
   const uschar * str, int fd_to_close)
 {
+DEBUG(D_acl) debug_print_socket(fd_to_close);
 (void) close(fd_to_close);
 return m_panic_defer(scanent, hostport, str);
 }
@@ -338,6 +339,7 @@ else
 return cre;
 }
 
+
 /*
  Simple though inefficient wrapper for reading a line.  Drop CRs and the
  trailing newline. Can return early on buffer full. Null-terminate.
@@ -369,8 +371,12 @@ while ((rcv = read(fd, p, 1)) > 0)
   }
 if (!ok)
   {
-  DEBUG(D_acl) debug_printf_indent("Malware scan: read %s (%s)\n",
+  DEBUG(D_acl)
+    {
+    debug_printf_indent("Malware scan: read %s (%s)\n",
                rcv==0 ? "EOF" : "error", strerror(errno));
+    debug_print_socket(fd);
+    }
   return rcv==0 ? -1 : -2;
   }
 *p = '\0';