diff options
author | Yunchih Chen <yunchih.cat@gmail.com> | 2017-12-01 11:24:05 +0800 |
---|---|---|
committer | Yunchih Chen <yunchih.cat@gmail.com> | 2017-12-01 11:25:37 +0800 |
commit | cf5a816a464cd38050152c6189e9ae400f888d5c (patch) | |
tree | dc79fb99ba570ba1e7af9b21899ec4080d869dfe | |
parent | 1336440f83216c58e2558fd07fec307422051cd6 (diff) | |
download | nfcollect-cf5a816a464cd38050152c6189e9ae400f888d5c.tar.gz nfcollect-cf5a816a464cd38050152c6189e9ae400f888d5c.tar.zst nfcollect-cf5a816a464cd38050152c6189e9ae400f888d5c.zip |
Minor fix
-rw-r--r-- | commit.c | 1 | ||||
-rw-r--r-- | main.h | 8 | ||||
-rw-r--r-- | nflog.c | 2 |
3 files changed, 5 insertions, 6 deletions
@@ -4,7 +4,6 @@ extern char *storage_dir; extern char *storage_prefix; -const uint32_t write_blk_size = 8196; void nfl_commit_init() { @@ -100,9 +100,9 @@ typedef struct _nflog_state_t { nflog_header_t* header; nflog_entry_t* store; - struct nflog_handle *nfl_fd; - struct nflog_g_handle *nfl_group_fd; + struct nflog_handle *nfl_fd; + struct nflog_g_handle *nfl_group_fd; - pthread_mutex_t lock; - pthread_t thread; + pthread_mutex_t lock; + pthread_t thread; } nflog_state_t; @@ -74,7 +74,7 @@ static int handle_packet(struct nflog_g_handle *gh, struct nfgenmsg *nfmsg, entry->uid = (uint32_t)~0; // get current timestamp - time(&entry->timestamp); + entry->timestamp = time(NULL); nf->header->n_entries++; } |