The Queue File, GFAX.$QU, is the database that contains a detailed record of information on each incoming and outgoing transaction. It is made up of a header and seven linked lists of records, and is located in the subdirectory defined by the GFAX environment variable.
A queue record is a data structure in the Queue File that permits an application program to communicate with the firmware. The fields in a queue record provide information about the image to be sent and where and how to send it, or when and how an image was received. Some diagnostic information is also stored in the queue record.
Queue File ListsThe Queue File contains seven linked lists:
Free ListThe Free List collects deleted and unused records for future use and re-allocation. When a new transaction is inserted into the Queue File, the Free List is checked for available records. If a record is available, it is overwritten, and "linked" into the appropriate linked list. Whenever records from the Free List are used, the Queue File does not grow in size. If there are no records available in the Free List, a new record is appended to the Queue File, and linked to the appropriate list - expanding the size of the Queue File. When a record is deleted from a linked list, it is placed in the Free List, and the size of the Queue File remains the same.
Pending ListThe Pending List stores records submitted to the Queue File for transmission. Records waiting for processing are sorted first by time, and then by the priority level.
Received ListThe Received List stores all completed incoming transmissions. Records in the Received List have a status code that indicates whether or not the operation was successful.
Sent ListThe Sent List is used to store completed outgoing transactions. Once a transmission record on the Pending List has finished processing, it is moved from the Pending List to the Sent List. Records in the Sent List have status codes indicating whether or not the operation was successful.
Conversion ListThe Conversion List is intended to be used by applications as a holding area for those queue records needing additional processing before being submitted to the Pending List. This is a good place to put non-TIFF files needing to be converted to TIFF format. The application is responsible for checking this list for jobs and submitting the file to be converted to a third-party conversion utility.
Control and Control Done ListsWhen the GDK System Service processes certain configuration commands, it generates records in the Control List for each fax channel. These records initialize the system, and are moved to the Control Done List when initialization is complete.
Queue File PointersThe functions, gfqFindFirst( ) and gfqFindNext( ), access the linked lists in the Queue File and allow you to traverse the Queue File lists and read information from the records. These functions are described in Chapter 5.
Using GFQRESET.EXEThe GFAX environment variable is always used to determine the path for the Queue File; the default filename is "GFAX.$QU." If a Queue File does not exist, the program GFQRESET.EXE creates one.
In addition to creating a Queue File, the GFQRESET.EXE program performs the following:
This is the usage for GFQRESET:
GFQRESET -pn -qn -rn <queue name>
The parameters are listed in Table 13, and are described in more detail in the following section.
Table 13. GFQRESET Parameters
Option |
Function |
-pn |
The purge flag option; these are the values for "n": 0 = No purging. (Default) 1 = Purge Control Done List. 2 = Purge Control List. 3 = Purge Control Done and Control Lists. |
-qn |
The Queue File check option; these are the values for "n": 0 = No queue file check. (Default) 1 = Queue file is checked and not repaired. 2 = Queue file is checked and repaired. |
-rn |
The pre-allocation and prevent-collapse flag. The range for "n" is 0 to 32,767. 0 = Queue file may be collapsed. |
<queue name> |
The name of the Queue File to create or reset. |
Pre-allocating Queue File RecordsSpace can be reserved in the Queue File by pre-allocating Queue File records with the -r option. Preallocated records are stored in the Free List of the Queue File, which holds "empty" records available for transaction data. Preallocation is used to allocate contiguous queue record storage to avoid file fragmentation.
If a Queue File does not exist, it is created and the specified number of records is inserted into the Free List. If a Queue File already exists, the queue records are counted and the program adds more records if needed. If the Free list of preallocated records is exhausted, the next record is appended to the Queue File.
Purging the Control List and Control Done ListRecords in the Control List and Control Done List are not needed after the GDK system has been initialized. To purge these lists so the Queue File does not become too large, use this command:
GFQRESET -p3
Checking and Repairing the Queue FileWith the -q option (Table 13), the Queue File can be checked and repaired if any records have been damaged. If an error is returned by the -q option, backup or delete the Queue File and restart the system.
CAUTION
Using the -q2 option may not always work and should not be attempted with the Dispatcher service running.
Click here to contact Dialogic Customer Engineering
Copyright 2000, Dialogic Corporation