diff options
author | Dimitri Staessens <dimitri.staessens@ugent.be> | 2018-02-22 22:35:32 +0100 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2018-02-23 11:31:13 +0100 |
commit | 89388506dd7d88adfc9188547341d7f36bcce397 (patch) | |
tree | c164ba9dfa1672dbd0a0d71791a0b146ceedfb2e /src | |
parent | 2bd60346e7a010c0da4d093dc5a7684257fc4ede (diff) | |
download | ouroboros-89388506dd7d88adfc9188547341d7f36bcce397.tar.gz ouroboros-89388506dd7d88adfc9188547341d7f36bcce397.zip |
ipcpd: Reset flow statistics on reuse
The flow statistics were not reset when a new connection was created,
resulting in wrong statistics.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Diffstat (limited to 'src')
-rw-r--r-- | src/ipcpd/normal/dt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ipcpd/normal/dt.c b/src/ipcpd/normal/dt.c index ebe8b01a..adf07d1a 100644 --- a/src/ipcpd/normal/dt.c +++ b/src/ipcpd/normal/dt.c @@ -272,6 +272,8 @@ static void set_used(int fd, pthread_mutex_lock(&dt.stat[fd].lock); + memset(&dt.stat[fd], 0, sizeof(dt.stat[fd])); + dt.stat[fd].stamp = b ? now.tv_sec : 0; pthread_mutex_unlock(&dt.stat[fd].lock); |