From 32c48edc85e05bedc6324109e8a5429767dda42a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 10 Jul 2007 01:45:07 +0000 Subject: I Fixed the Hash bug!!! --- src/client.cpp | 7 +++++-- src/hash.h | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/client.cpp b/src/client.cpp index dc91e4b..7332abc 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -63,8 +63,11 @@ void Bu::Client::processOutput() { if( sWriteBuf.getSize() > 0 ) { - pSocket->write( sWriteBuf.getStr(), sWriteBuf.getSize() ); - sWriteBuf.clear(); + int nAmnt = (sWriteBuf.getSize()<2048)?(sWriteBuf.getSize()):(2048); + printf("Transmitting %d of %ld bytes.\n", nAmnt, sWriteBuf.getSize() ); + pSocket->write( sWriteBuf.getStr(), nAmnt ); + sWriteBuf.trimFront( nAmnt ); + //sWriteBuf.clear(); } } diff --git a/src/hash.h b/src/hash.h index f183823..36665a6 100644 --- a/src/hash.h +++ b/src/hash.h @@ -856,7 +856,8 @@ namespace Bu // First we scan to see if the key is already there, abort if we // run out of probing room, or we find a non-filled entry - for( int8_t j = 0; + int8_t j; + for( j = 0; isFilled( nCur ) && j < 32; nCur = (nCur + (1<