git://git.onelab.eu
/
iptables.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0cdc8d
)
Graceful recovery.
author
Sapan Bhatia
<sapanb@cs.princeton.edu>
Thu, 15 Nov 2007 22:07:28 +0000
(22:07 +0000)
committer
Sapan Bhatia
<sapanb@cs.princeton.edu>
Thu, 15 Nov 2007 22:07:28 +0000
(22:07 +0000)
src/fprobe-ulog.c
patch
|
blob
|
history
diff --git
a/src/fprobe-ulog.c
b/src/fprobe-ulog.c
index
31d1e02
..
c5be35f
100644
(file)
--- 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