1

Closed

Access violation when using send-only and receive-only queue-objects

description

There is a limit of only 10 queue objects for one java application. This limit is introduced by a global container containing all queue-objects. It uses two entries in this container for each queue (send + receive).
 
The function to find the next free container-slot fails to handle the situation of using send-only and receive-only queue-objects:
 
int GetNextFreeHandleSlot()
{
int i, selected=-1;
for (i=0; (i < MAX_QUEUES) && (selected==-1); i++) {
if (qhandles[i*2] == NULL) {
    selected= i;
}
}
return selected;
}
 
The fixed version:
 
int GetNextFreeHandleSlot()
{
int i, selected=-1;
for (i=0; (i < MAX_QUEUES) && (selected==-1); i++) {
    if (qhandles[i*2] == NULL && qhandles[i*2+1] == NULL) {
        selected= i;
    }
}
return selected;
}
Closed Mar 28, 2010 at 9:03 PM by Cheeso
Fixed in changeset 48988. first binary in which this fix is available: v1.2.1.2

comments