From 30614ad73375208ed0902ddcf9380b60534b94d8 Mon Sep 17 00:00:00 2001 From: glenux Date: Mon, 6 Mar 2006 12:14:40 +0000 Subject: [PATCH] --- src/lowreceiver_cb.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/lowreceiver_cb.cc b/src/lowreceiver_cb.cc index cc34028..f421274 100644 --- a/src/lowreceiver_cb.cc +++ b/src/lowreceiver_cb.cc @@ -1,13 +1,13 @@ #include "lowreceiver.h" -#include "messagecell_ab.h" +#include "messagecell_cb.h" void LowReceiver::manage_cbcast(Message * mesg) { - static std::list fifo_get; - static std::list fifo_send; + static std::list fifo_get; + static std::list fifo_send; - std::list::iterator iter; + std::list::iterator iter; printf("LowReceiver::manage_cbcast -- init\n"); // identifiant = horloge + id_site_emeteur @@ -24,11 +24,11 @@ void LowReceiver::manage_cbcast(Message * mesg) { //de partager une variable+mutex avec le sender //FIXME: chercher si l'on a déja recu ce message - MessageCellAb * cell = NULL; + MessageCellCb * cell = NULL; for (iter = fifo_send.begin(); iter != fifo_send.end(); iter++){ //on fait pointer cell sur la cellule si égale a l'id du message //courant - MessageCellAb * cur = *iter; + MessageCellCb * cur = *iter; if (cur->message == mesg){ printf("LowReceiver::manage_cbcast -- message seen\n"); firstSeenMessage = false; @@ -39,7 +39,7 @@ void LowReceiver::manage_cbcast(Message * mesg) { if (firstSeenMessage){ //sinon on le crée printf("LowReceiver::manage_cbcast -- message is first\n"); - cell = new MessageCellAb(); + cell = new MessageCellCb(); cell->message = new Message(*mesg); //et on l'ajoute au fifo fifo_send.push_back(cell); @@ -64,7 +64,7 @@ void LowReceiver::manage_cbcast(Message * mesg) { } else { printf("LowReceiver::manage_cbcast - Received a message from a friend\n"); for (iter = fifo_get.begin(); iter != fifo_get.end(); iter++){ - MessageCellAb * cur = *iter; + MessageCellCb * cur = *iter; if (cur->message == mesg) { printf("LowReceiver::manage_cbcast -- message seen\n"); firstSeenMessage = false; @@ -76,9 +76,9 @@ void LowReceiver::manage_cbcast(Message * mesg) { printf("LowReceiver::manage_cbcast -- message is first\n"); // si le message est vu pour la premiere fois: // - on l'ajoute dans la liste d'attente - MessageCellAb * cell = new MessageCellAb(); + MessageCellCb * cell = new MessageCellCb(); cell->message = new Message(*mesg); - cell->type = MessageCellAb::TYPE_TEMPORARY; + cell->type = MessageCellCb::TYPE_TEMPORARY; // - on retourne une estampille(reception) a l'emeteur } else {