From 16287d957da4bb3394ac8272d889a972b0d9caa6 Mon Sep 17 00:00:00 2001 From: glenux Date: Mon, 23 Feb 2004 20:38:02 +0000 Subject: [PATCH] * destruction recursive des queues --- src/queueElemDelete.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/queueElemDelete.c diff --git a/src/queueElemDelete.c b/src/queueElemDelete.c new file mode 100644 index 0000000..8af618d --- /dev/null +++ b/src/queueElemDelete.c @@ -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; +}