X-Git-Url: http://git.onelab.eu/?p=fprobe-ulog.git;a=blobdiff_plain;f=src%2Ffprobe-ulog.c;h=c5be35fcba0a0e52c21e71d1442f33672529914e;hp=31d1e022600973f98f631adc3f58eb484f717ad8;hb=4ca11171ac9fca22562dc2c2f2255f74bf4c6f88;hpb=a2a10337384cfbcf977f7a8c0062a5c5a95ac5a5 diff --git a/src/fprobe-ulog.c b/src/fprobe-ulog.c index 31d1e02..c5be35f 100644 --- a/src/fprobe-ulog.c +++ b/src/fprobe-ulog.c @@ -378,6 +378,18 @@ inline void copy_flow(struct Flow *src, struct Flow *dst) dst->flags = src->flags; } +void get_cur_epoch() { + int fd, len; + fd = open("/tmp/fprobe_last_epoch",O_RDONLY); + if (fd != -1) { + char snum[7]; + read(fd, snum, 7); + sscanf(snum,"%d",&cur_epoch); + } + return; +} + + void update_cur_epoch_file(int n) { int fd, len; char snum[7]; @@ -1447,6 +1459,8 @@ bad_collector: peers[npeers].write_fd = START_VALUE; peers[npeers].type = PEER_FILE; peers[npeers].seq = 0; + + get_cur_epoch(); npeers++; } else