diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2011-12-19 17:12:41 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-01-10 01:54:45 +0100 |
commit | eb31a0c3eb9db28e673587d4614662645a10cffa (patch) | |
tree | 2232d6322698dd50a9e7eec9ddc1cace47764d91 /src/sync-mode.c | |
parent | 2719bd93ad5f589139d8ede0726fa6a2ef2eb321 (diff) |
conntrackd: minor cleanup for commit
Comestical cleanup for better code readability.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/sync-mode.c')
-rw-r--r-- | src/sync-mode.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sync-mode.c b/src/sync-mode.c index 7e6fa31..fa522c7 100644 --- a/src/sync-mode.c +++ b/src/sync-mode.c @@ -516,6 +516,14 @@ static int local_handler_sync(int fd, int type, void *data) dlog(LOG_NOTICE, "committing external cache"); ret = STATE_SYNC(external)->ct.commit(STATE_SYNC(commit).h, fd); + if (ret == 0) { + dlog(LOG_NOTICE, "commit already in progress, " + "skipping"); + ret = LOCAL_RET_OK; + } else { + /* Keep open the client, we want synchronous commit. */ + ret = LOCAL_RET_STOLEN; + } break; case RESET_TIMERS: if (!alarm_pending(&STATE_SYNC(reset_cache_alarm))) { |