summaryrefslogtreecommitdiff
path: root/filter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'filter.cpp')
-rw-r--r--filter.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/filter.cpp b/filter.cpp
index 2eacea6..b98f873 100644
--- a/filter.cpp
+++ b/filter.cpp
@@ -136,9 +136,6 @@ void cFilterInfosatepg::Process(u_short Pid, u_char Tid, const u_char *Data, int
// Check if we already have this packet
if (global->Infosatdata[mac].GetBit(ntohs(ishdr->pktnr))) return;
- // set bit in Infosatdata bitfield
- global->Infosatdata[mac].SetBit(ntohs(ishdr->pktnr),true);
-
#ifdef VDRDEBUG
dsyslog("infosatepg: mac=%02x-%02x-%02x-%02x-%02x-%02x",eth_hdr.h_dest[0],eth_hdr.h_dest[1],
eth_hdr.h_dest[2],eth_hdr.h_dest[3],eth_hdr.h_dest[4],eth_hdr.h_dest[5] );
@@ -165,7 +162,11 @@ void cFilterInfosatepg::Process(u_short Pid, u_char Tid, const u_char *Data, int
#ifdef VDRDEBUG
dsyslog("infosatepg: writing to %li",offset);
#endif
- write(f,infosatdata,len);
+ if (write(f,infosatdata,len)==len)
+ {
+ // set bit in Infosatdata bitfield
+ global->Infosatdata[mac].SetBit(ntohs(ishdr->pktnr),true);
+ }
}
close(f);