From: <pau...@us...> - 2007-10-22 17:09:39
|
Revision: 5354 http://smartfrog.svn.sourceforge.net/smartfrog/?rev=5354&view=rev Author: paul_murray Date: 2007-10-22 10:09:35 -0700 (Mon, 22 Oct 2007) Log Message: ----------- SFOS-504: ping protocol failing with high node ids - nodeIdSet flip method fixed Modified Paths: -------------- trunk/core/components/anubis/src/org/smartfrog/services/anubis/partition/util/NodeIdSet.java Modified: trunk/core/components/anubis/src/org/smartfrog/services/anubis/partition/util/NodeIdSet.java =================================================================== --- trunk/core/components/anubis/src/org/smartfrog/services/anubis/partition/util/NodeIdSet.java 2007-10-22 16:10:16 UTC (rev 5353) +++ trunk/core/components/anubis/src/org/smartfrog/services/anubis/partition/util/NodeIdSet.java 2007-10-22 17:09:35 UTC (rev 5354) @@ -156,12 +156,16 @@ */ public boolean flip(int i){ boolean flipOk = false; - if (i < this.size()){ + if (i >= this.size()){ + // resize + storage = this.createByteArray(i+1, storage); + } +// if (i < this.size()){ int byteNbr = i / 8; byte pos = (byte)(i % 8); storage[byteNbr] = (byte)(storage[byteNbr] ^ (1 << pos)); flipOk = true; - } +// } return flipOk; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |