summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2021-07-16 18:36:51 +0200
committerSander Vrijders <sander@ouroboros.rocks>2021-07-18 14:13:56 +0200
commit19a5cd2b494f5cea83f1c6332eab93ec19a9b649 (patch)
tree8aac25111757ef77a9320a9141948353b4745c6b
parentcbc296a8b351bbdaa5ed57b1b7caaa1db677b435 (diff)
downloadouroboros-19a5cd2b494f5cea83f1c6332eab93ec19a9b649.zip
ouroboros-19a5cd2b494f5cea83f1c6332eab93ec19a9b649.tar.gz
ipcpd: Fix flow allocator build without fuse
The u_snd and u_rcv variables were not guarded by ifdefs when updating. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
-rw-r--r--src/ipcpd/unicast/fa.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ipcpd/unicast/fa.c b/src/ipcpd/unicast/fa.c
index c2059e3..6e6d52f 100644
--- a/src/ipcpd/unicast/fa.c
+++ b/src/ipcpd/unicast/fa.c
@@ -586,9 +586,9 @@ static void * fa_handle_packet(void * o)
}
flow = &fa.flows[fd];
-
+#ifdef IPCP_FLOW_STATS
flow->u_rcv++;
-
+#endif
ca_ctx_update_ece(flow->ctx, ntoh16(msg->ece));
pthread_rwlock_unlock(&fa.flows_lock);
@@ -888,8 +888,9 @@ static int fa_update_remote(int fd,
msg->ece = hton16(ece);
r_addr = flow->r_addr;
+#ifdef IPCP_FLOW_STATS
flow->u_snd++;
-
+#endif
pthread_rwlock_unlock(&fa.flows_lock);