From 9e83af07da15782de803cfb2f58063666d3fe813 Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Wed, 4 Mar 2009 21:12:50 +0000 Subject: [PATCH] properly encode >1024 in probe requests (fix #52) --- src/iodine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iodine.c b/src/iodine.c index 0554382..71dd2cb 100644 --- a/src/iodine.c +++ b/src/iodine.c @@ -432,7 +432,7 @@ send_fragsize_probe(int fd, int fragsize) fragsize &= 2047; buf[0] = 'r'; /* Probe downstream fragsize packet */ - buf[1] = b32_5to8((userid << 1) | (fragsize & 1024)); + buf[1] = b32_5to8((userid << 1) | ((fragsize >> 10) & 1)); buf[2] = b32_5to8((fragsize >> 5) & 31); buf[3] = b32_5to8(fragsize & 31);