diff --git a/src/queueDelete.c b/src/queueDelete.c index e69de29..56b8fbf 100644 --- a/src/queueDelete.c +++ b/src/queueDelete.c @@ -0,0 +1,19 @@ +#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; +} + +