[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: fix #4895: set highbit alwa
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: fix #4895: set highbit always for the returned cn, not just on the second call |
Date: |
Wed, 15 Feb 2017 17:49:06 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 7795e7954 fix #4895: set highbit always for the returned cn, not just
on the second call
7795e7954 is described below
commit 7795e79543c6828b34977e35a10f5325beae55c7
Author: Christian Grothoff <address@hidden>
AuthorDate: Wed Feb 15 17:49:59 2017 +0100
fix #4895: set highbit always for the returned cn, not just on the second
call
---
src/cadet/gnunet-service-cadet-new_tunnels.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/cadet/gnunet-service-cadet-new_tunnels.c
b/src/cadet/gnunet-service-cadet-new_tunnels.c
index 1b7e4d9d3..5b3abde57 100644
--- a/src/cadet/gnunet-service-cadet-new_tunnels.c
+++ b/src/cadet/gnunet-service-cadet-new_tunnels.c
@@ -1888,12 +1888,12 @@ get_next_free_ctn (struct CadetTunnel *t)
ctn = ntohl (t->next_ctn.cn);
while (NULL !=
GNUNET_CONTAINER_multihashmap32_get (t->channels,
- ctn))
+ ctn | highbit))
{
- ctn = ((ctn + 1) & (~ HIGH_BIT)) | highbit;
+ ctn = ((ctn + 1) & (~ HIGH_BIT));
}
- t->next_ctn.cn = htonl (((ctn + 1) & (~ HIGH_BIT)) | highbit);
- ret.cn = htonl (ctn);
+ t->next_ctn.cn = htonl ((ctn + 1) & (~ HIGH_BIT));
+ ret.cn = htonl (ctn | highbit);
return ret;
}
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet] branch master updated: fix #4895: set highbit always for the returned cn, not just on the second call,
gnunet <=