diff options
author | Dimitri Staessens <dimitri.staessens@ugent.be> | 2018-10-11 20:27:32 +0200 |
---|---|---|
committer | Dimitri Staessens <dimitri.staessens@ugent.be> | 2018-10-11 20:27:32 +0200 |
commit | 1ee129f4479b1910afc929f24bb70b8bc6478f01 (patch) | |
tree | f899381d05ed5f322829bc478c9e3517cf1f9184 /src/ipcpd/normal/dt.c | |
parent | 6856f3e24fa00b99747bab790b478866212b2e2d (diff) | |
parent | 558fc46c63d28ce2ffd0abc5c737f49cc185ba82 (diff) | |
download | ouroboros-1ee129f4479b1910afc929f24bb70b8bc6478f01.tar.gz ouroboros-1ee129f4479b1910afc929f24bb70b8bc6478f01.zip |
Merge branch 'testing' into be
Diffstat (limited to 'src/ipcpd/normal/dt.c')
-rw-r--r-- | src/ipcpd/normal/dt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ipcpd/normal/dt.c b/src/ipcpd/normal/dt.c index dc7343f1..54346458 100644 --- a/src/ipcpd/normal/dt.c +++ b/src/ipcpd/normal/dt.c @@ -532,12 +532,14 @@ static void packet_handler(int fd, if (ipcp_flow_write(dt_pci.eid, sdb)) { ipcp_sdb_release(sdb); #ifdef IPCP_FLOW_STATS - pthread_mutex_lock(&dt.stat[dt_pci.eid].lock); + pthread_mutex_lock(&dt.stat[fd].lock); ++dt.stat[fd].rcv_pkt[qc]; dt.stat[fd].rcv_bytes[qc] += len; + pthread_mutex_unlock(&dt.stat[fd].lock); + + pthread_mutex_lock(&dt.stat[dt_pci.eid].lock); ++dt.stat[dt_pci.eid].w_drp_pkt[qc]; dt.stat[dt_pci.eid].w_drp_bytes[qc] += len; - pthread_mutex_unlock(&dt.stat[dt_pci.eid].lock); #endif |