Revision: 520
Author: jadestorm
Date: Sat Nov 21 17:28:39 2009
Log: Added eclipse project file and updated seqnum to fix one icq sequence
issue.
http://code.google.com/p/joscar/source/detail?r=520
Added:
/trunk/.project
Modified:
/trunk/protocol/src/net/kano/joscar/SeqNum.java
=======================================
--- /dev/null
+++ /trunk/.project Sat Nov 21 17:28:39 2009
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>joscar</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
=======================================
--- /trunk/protocol/src/net/kano/joscar/SeqNum.java Tue Nov 11 19:25:44 2003
+++ /trunk/protocol/src/net/kano/joscar/SeqNum.java Sat Nov 21 17:28:39 2009
@@ -94,11 +94,19 @@
* within the given range
*/
public SeqNum(long min, long max, long current) {
+ long n;
+ long s = 0;
+ long i;
+
DefensiveTools.checkRange(current, "current", min, max);
+ n = current;
+
+ for (i = n; (i >>= 3) != 0; s += i);
+
this.min = min;
this.max = max;
- this.last = current;
+ this.last = (long)((((0 - s) ^ (byte)n) & 7 ^ n) + 2);
}
/**