From d453fcff58376b96f79759bf5cb34d14652464af Mon Sep 17 00:00:00 2001
From: William Metcalf <william.metcalf@gmail.com>
Date: Thu, 18 Mar 2010 06:36:57 -0500
Subject: [PATCH] fix for pcap error displayed at exit flow-mem.h removed from Makefile.am as it doesn't exist

---
 src/Makefile.am        |    1 -
 src/source-pcap-file.c |    3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index fa8052a..3821679 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -31,7 +31,6 @@ flow.c flow.h \
 flow-queue.c flow-queue.h \
 flow-hash.c flow-hash.h \
 flow-util.c flow-util.h \
-flow-mem.h \
 util-mem.h \
 flow-var.c flow-var.h \
 flow-bit.c flow-bit.h \
diff --git a/src/source-pcap-file.c b/src/source-pcap-file.c
index 9a1b454..575d150 100644
--- a/src/source-pcap-file.c
+++ b/src/source-pcap-file.c
@@ -120,7 +120,8 @@ TmEcode ReceivePcapFile(ThreadVars *tv, Packet *p, void *data, PacketQueue *pq)
         EngineStop();
         return TM_ECODE_FAILED;
     } else if (r == 0) {
-        SCLogError(SC_ERR_PCAP_DISPATCH, "Error dispatching pcap file or end of pcap file, code %" PRId32 " error %s", r, pcap_geterr(pcap_g.pcap_handle));
+        /* we will always have an error code 0 at the end of reading a savefile this is not an error 0 on success, -1 on error and -2 if breakloop was used interrupt the captue */
+        SCLogInfo("End of pcap file reached, code %" PRId32 "", r);
         EngineStop();
         SCReturnInt(TM_ECODE_FAILED);
     }
-- 
1.6.3.3

