From be70ef346e77d64c2616b5d23c9971fb7807b96c Mon Sep 17 00:00:00 2001 From: glenux Date: Mon, 6 Mar 2006 13:19:22 +0000 Subject: [PATCH] --- src/clock_cb.cc | 3 ++- src/config.cc | 7 ++++++- src/lowreceiver_cb.cc | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/clock_cb.cc b/src/clock_cb.cc index 699d92b..8192f84 100644 --- a/src/clock_cb.cc +++ b/src/clock_cb.cc @@ -23,8 +23,9 @@ bool ClockCb::adjust(TimeStamp ts){ // lock jusqu'a la fin de la fonction Glib::Mutex::Lock lock(_mutex); // si les conditions sont remplies, alors on peut modifier l'horloge - + printf("ClockCb::adjust -- stamp index : %d\n", ts.getIndex() ); + return result; } diff --git a/src/config.cc b/src/config.cc index 54f62e9..24c7c10 100644 --- a/src/config.cc +++ b/src/config.cc @@ -122,7 +122,12 @@ bool Config::isValid() { } valid++; - if (_index >= 0) { + if (_index >= 0){ + score++; + } + valid++; + + if (_index < _group_hosts.size()){ score++; } valid++; diff --git a/src/lowreceiver_cb.cc b/src/lowreceiver_cb.cc index 6d0a73c..975ec93 100644 --- a/src/lowreceiver_cb.cc +++ b/src/lowreceiver_cb.cc @@ -22,8 +22,8 @@ void LowReceiver::manage_cbcast(Message * mesg) { printf("LowReceiver::manage_cbcast - Received my own message -- delivering automatically\n"); //on faire la gestion du cbcast/send ici, c'est plus simple que //de partager une variable+mutex avec le sender - - + // + _clock.adjust(mesg->getStamp()); } else { printf("LowReceiver::manage_cbcast - Received a message from a friend\n");