* destruction recursive des queues
This commit is contained in:
parent
244ffad0bf
commit
16287d957d
1 changed files with 17 additions and 0 deletions
17
src/queueElemDelete.c
Normal file
17
src/queueElemDelete.c
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
#include "libnazgul.h"
|
||||||
|
|
||||||
|
int msgQueueElemDelete(msgQueueElemId queueElemId){
|
||||||
|
msgQueueElem * queueElemAddr;
|
||||||
|
msgQueueElemId nextIdToDie;
|
||||||
|
|
||||||
|
queueElemAddr = msgQueueElemOpen(queueElemId);
|
||||||
|
msgQueueElemClose(queueElem);
|
||||||
|
if (nextIdToDie != NULL){
|
||||||
|
return msgQueueElemDelete(nextIdToDie);
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ERROR:
|
||||||
|
return -1;
|
||||||
|
}
|
Loading…
Reference in a new issue