*** empty log message ***

This commit is contained in:
glenux 2004-02-23 22:02:37 +00:00 committed by Glenn Y. Rolland
parent 13fe3a77d1
commit ca8501406a
2 changed files with 30 additions and 1 deletions

View file

@ -13,7 +13,7 @@ int msgQueueElemAdd(msgQueue * queue, msgQueueElemId newElemId){
goto ERROR;
}
strcpy(queueNewTailElem->next,newElemId);
if (msgQueueElemClose(queueNewTailElem)){
if (msgQueueElemClose(queueNewTailElem) <0 ){
NZG_ERROR("msgQueueElemClose",newElemId);
goto ERROR;
}

29
src/queueRem.c Normal file
View file

@ -0,0 +1,29 @@
#include "libnazgul.h"
// l'id de l'element enlevé vas dans oldElemId
int msgQueueElemRem(msgQueue * queue, msgQueueElemId oldElemId){
msgQueueElem * queueOldHeadElem;
if (strcmp(queue->headId,queue->tailId)==0){
NZG_ERROR("msgQueueElemRem : Empty queue",queue->id);
goto ERROR;
}
strcpy(oldElemId,queue->headId);
queueOldHeadElem=msgQueueElemOpen(oldElemId);
if (queueOldHeadElem == NULL){
NZG_ERROR("msgQueueElemOpen",oldElemId);
goto ERROR;
}
strcpy(queue->headId,queueOldHeadElem->next);
if (msgQueueElemClose(queueOldHeadElem)<0 ){
NZG_ERROR("msgQueueElemClose",oldElemId);
goto ERROR;
}
return 0;
ERROR:
return -1;
}