Add a function to AsyncQueue to tell if we are connected
This commit is contained in:
11
asyncqueue.c
11
asyncqueue.c
@@ -1238,3 +1238,14 @@ void *AsyncUnitGetQueueContext(pAsyncUnit unit)
|
|||||||
assert(unit->queue);
|
assert(unit->queue);
|
||||||
return unit->queue->context;
|
return unit->queue->context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int AsyncUnitIsQueueConnected(pAsyncUnit unit)
|
||||||
|
{
|
||||||
|
assert(unit);
|
||||||
|
assert(unit->queue);
|
||||||
|
if (unit && unit->queue)
|
||||||
|
if (unit->queue->state == eAsyncConnected)
|
||||||
|
return 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|||||||
@@ -195,4 +195,8 @@ void *AsyncUnitSetQueueContext(pAsyncUnit handle, void *cntx);
|
|||||||
*/
|
*/
|
||||||
void *AsyncUnitGetQueueContext(pAsyncUnit handle);
|
void *AsyncUnitGetQueueContext(pAsyncUnit handle);
|
||||||
|
|
||||||
|
/** \brief return one if queue is connected, zero otherwise
|
||||||
|
*/
|
||||||
|
int AsyncUnitIsQueueConnected(pAsyncUnit handle);
|
||||||
|
|
||||||
#endif /* SICSASYNCQUEUE */
|
#endif /* SICSASYNCQUEUE */
|
||||||
|
|||||||
Reference in New Issue
Block a user