| home | layout | structure | qd | hexdump |
          File : queue.dat
 Queue Version : 5.01
          Size : 7168 bytes
    F@H Client : FAH502-Linux.exe

Current Index

Current index: 7
When a work unit is downloaded, it is assigned to one of the ten queue entries. The data in queue.dat at that index is used by the client to keep track of that unit's status. It is especially needed if the client is stopped and restarted, or if finished work doesn't upload on the first attempt. This index number is also used in file names in the work subdirectory. In this example, since the current index is 7, the work file names have the string "_07" in them.

The indices are assigned sequentially, starting at 1, and cycling back to 0 after 9. If work is still active at the next sequential index (most likely because it has had a lot of trouble uploading), that index will be skipped over. An active index won't be reused unless there are no inactive ones left at all.


grep "0004 Current" qd.c
        u32             current;        /* 0004 Current index number */

./qd -q queue.dat | grep "Current index"
Current index: 2

hexdump -C -s 4 -n 4 queue.dat
00000004  02 00 00 00                                       |....|
00000008