*** empty log message ***
This commit is contained in:
parent
a2957a7526
commit
d0c95280a7
2 changed files with 18 additions and 18 deletions
|
@ -49,7 +49,7 @@ int msgPut(msgSpace * space,int queueIndex, void * addr){
|
|||
|
||||
//ajouter le message a la bonne file...
|
||||
if (msgQueueAdd(queue,newElemId) < 0){
|
||||
NZG_ERROR("msgQueueAdd","");
|
||||
NZG_ERROR("msgQueueAdd",newElemId);
|
||||
goto ERROR;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,11 +21,11 @@ int msgQueueAdd(msgQueue * queue, msgQueueElemId newElemId){
|
|||
/* TODO: verifier si la liste n'est pas vide... */
|
||||
if((strcmp(queue->headId,queue->id)==0)
|
||||
&& (strcmp(queue->tailId,queue->id)==0)) {
|
||||
NZG_ERROR("msgQueueAdd",queue->id);
|
||||
goto ERROR;
|
||||
}
|
||||
|
||||
|
||||
printf("- premier elem de queue -\n");
|
||||
// on donne a la queue l'id de l'element
|
||||
strcpy(queue->headId,newElemId);
|
||||
strcpy(queue->tailId,newElemId);
|
||||
} else {
|
||||
/* on informe son prédecesseur qu'il a un suivant */
|
||||
queueOldTailElem=msgQueueElemOpen(queue->tailId);
|
||||
if (queueOldTailElem == NULL){
|
||||
|
@ -33,13 +33,13 @@ int msgQueueAdd(msgQueue * queue, msgQueueElemId newElemId){
|
|||
goto ERROR;
|
||||
}
|
||||
strcpy(queueOldTailElem->next,newElemId);
|
||||
if (msgQueueElemClose(queueOldTailElem)){
|
||||
if (msgQueueElemClose(queueOldTailElem) < 0){
|
||||
NZG_ERROR("msgQueueElemClose",queue->tailId);
|
||||
goto ERROR;
|
||||
}
|
||||
// on donne a la queue l'id du dernier element
|
||||
strcpy(queue->tailId,newElemId);
|
||||
|
||||
}
|
||||
// on incremente elemCounter
|
||||
queue->elemCounter++;
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue