Thread: [Carrot2-cvs] carrot2/components/controllers/carrot2-web-controller/src/com/dawidweiss/carrot/contro
Brought to you by:
dawidweiss,
stachoo
From: <daw...@us...> - 2004-01-19 21:28:27
|
Update of /cvsroot/carrot2/carrot2/components/controllers/carrot2-web-controller/src/com/dawidweiss/carrot/controller/carrot2 In directory sc8-pr-cvs1:/tmp/cvs-serv1190/src/com/dawidweiss/carrot/controller/carrot2 Modified Files: RequestHistory.java Log Message: [bugfix] Recent queries now should show properly. Index: RequestHistory.java =================================================================== RCS file: /cvsroot/carrot2/carrot2/components/controllers/carrot2-web-controller/src/com/dawidweiss/carrot/controller/carrot2/RequestHistory.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RequestHistory.java 27 Nov 2003 22:30:31 -0000 1.2 --- RequestHistory.java 19 Jan 2004 21:28:23 -0000 1.3 *************** *** 48,55 **** final int localmax = this.max; synchronized (this) { ! int from = last; int k = 0; ! while (from != position && max > 0) { query[k] = this.queries[from]; process[k] = this.processes[from]; --- 48,58 ---- final int localmax = this.max; synchronized (this) { ! int from = position; int k = 0; ! while (from != last && max > 0) { ! from = from - 1; ! if (from == -1) from = this.max-1; ! query[k] = this.queries[from]; process[k] = this.processes[from]; *************** *** 58,62 **** max--; k++; - from = (from + 1) % localmax; } return k; --- 61,64 ---- *************** *** 69,76 **** final int localmax = this.max; synchronized (this) { ! int from = last; int k = 0; ! while (from != position && max > 0) { query[k] = this.queries[from]; process[k] = this.processes[from]; --- 71,81 ---- final int localmax = this.max; synchronized (this) { ! int from = position; int k = 0; ! while (from != last && max > 0) { ! from = from - 1; ! if (from == -1) from = this.max-1; ! query[k] = this.queries[from]; process[k] = this.processes[from]; *************** *** 78,82 **** max--; k++; - from = (from + 1) % localmax; } return k; --- 83,86 ---- |