From c6fabef5eda01103194c3d66db5f14d64351a189 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; +}