certi-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[certi-cvs] certi RTIA/FederationManagement.cc RTIG/RTIG.cc...


From: certi-cvs
Subject: [certi-cvs] certi RTIA/FederationManagement.cc RTIG/RTIG.cc...
Date: Tue, 08 Apr 2008 14:18:19 +0000

CVSROOT:        /sources/certi
Module name:    certi
Changes by:     ROUSSELOT <rousse>      08/04/08 14:18:18

Modified files:
        RTIA           : FederationManagement.cc 
        RTIG           : RTIG.cc RTIG.hh RTIG_processing.cc 

Log message:
        Maybe bug #22491 correction. Need validation (by Carle)
        RTIG don't answer to RTIA on Resign Federation

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/FederationManagement.cc?cvsroot=certi&r1=3.52&r2=3.53
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG.cc?cvsroot=certi&r1=3.38&r2=3.39
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG.hh?cvsroot=certi&r1=3.23&r2=3.24
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG_processing.cc?cvsroot=certi&r1=3.60&r2=3.61

Patches:
Index: RTIA/FederationManagement.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/FederationManagement.cc,v
retrieving revision 3.52
retrieving revision 3.53
diff -u -b -r3.52 -r3.53
--- RTIA/FederationManagement.cc        1 Apr 2008 13:00:46 -0000       3.52
+++ RTIA/FederationManagement.cc        8 Apr 2008 14:18:17 -0000       3.53
@@ -18,7 +18,7 @@
 // along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// $Id: FederationManagement.cc,v 3.52 2008/04/01 13:00:46 rousse Exp $
+// $Id: FederationManagement.cc,v 3.53 2008/04/08 14:18:17 rousse Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -446,7 +446,7 @@
 FederationManagement::resignFederationExecution(RTI::ResignAction,
                                                 TypeException &e)
 {
-    NetworkMessage msg ;
+    NetworkMessage msg, reponse ;
     TypeException exception = e_NO_EXCEPTION ;
 
     G.Out(pdGendoc,"enter FederationManagement::resignFederationExecution");
@@ -471,6 +471,10 @@
         G.Out(pdGendoc,"      resignFederationExecution ===> send NMessage RFE 
to RTIG");
         comm->sendMessage(&msg);
 
+        comm->waitMessage(&reponse,
+                          NetworkMessage::RESIGN_FEDERATION_EXECUTION,
+                          federate);
+
         _est_membre_federation = false ;
         _numero_federation = 0 ;
         federate = 0 ;
@@ -484,12 +488,12 @@
                 _FEDid[0] = '\0' ;
                 }
             }
-
-        // BUG: Voir DestroyFederation ou ~GF.
-       // if (!_est_createur_federation)
-          //_fin_execution = true ;
-    }
     G.Out(pdGendoc,"exit  FederationManagement::resignFederationExecution");
+        }
+    else
+        {    
+        G.Out(pdGendoc,"exit  FederationManagement::resignFederationExecution 
on exception");
+        }
 }
 
 // ----------------------------------------------------------------------------
@@ -1030,4 +1034,4 @@
 
 }} // namespace certi/rtia
 
-// $Id: FederationManagement.cc,v 3.52 2008/04/01 13:00:46 rousse Exp $
+// $Id: FederationManagement.cc,v 3.53 2008/04/08 14:18:17 rousse Exp $

Index: RTIG/RTIG.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/RTIG.cc,v
retrieving revision 3.38
retrieving revision 3.39
diff -u -b -r3.38 -r3.39
--- RTIG/RTIG.cc        8 Apr 2008 08:50:23 -0000       3.38
+++ RTIG/RTIG.cc        8 Apr 2008 14:18:17 -0000       3.39
@@ -18,7 +18,7 @@
 // along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// $Id: RTIG.cc,v 3.38 2008/04/08 08:50:23 rousse Exp $
+// $Id: RTIG.cc,v 3.39 2008/04/08 14:18:17 rousse Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -142,7 +142,7 @@
         D.Out(pdTrace, "Federate no %u leaves federation no %u .",
               msg->federate, msg->federation);
         auditServer.setLevel(9);
-        processResignFederation(msg->federation, msg->federate);
+        processResignFederation(link,msg->federation, msg->federate);
         break ;
 
       case NetworkMessage::REGISTER_FEDERATION_SYNCHRONIZATION_POINT:
@@ -991,4 +991,4 @@
 
 }} // namespace certi/rtig
 
-// $Id: RTIG.cc,v 3.38 2008/04/08 08:50:23 rousse Exp $
+// $Id: RTIG.cc,v 3.39 2008/04/08 14:18:17 rousse Exp $

Index: RTIG/RTIG.hh
===================================================================
RCS file: /sources/certi/certi/RTIG/RTIG.hh,v
retrieving revision 3.23
retrieving revision 3.24
diff -u -b -r3.23 -r3.24
--- RTIG/RTIG.hh        27 Feb 2008 16:38:27 -0000      3.23
+++ RTIG/RTIG.hh        8 Apr 2008 14:18:18 -0000       3.24
@@ -18,7 +18,7 @@
 // along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// $Id: RTIG.hh,v 3.23 2008/02/27 16:38:27 rousse Exp $
+// $Id: RTIG.hh,v 3.24 2008/04/08 14:18:18 rousse Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef CERTI_RTIG_HH
@@ -69,7 +69,7 @@
     // Event handlers
     void processCreateFederation(Socket*, NetworkMessage*);
     void processJoinFederation(Socket*, NetworkMessage*);
-    void processResignFederation(Handle, FederateHandle);
+    void processResignFederation(Socket*,Handle, FederateHandle);
     void processDestroyFederation(Socket*, NetworkMessage*);
     void processSetTimeRegulating(NetworkMessage *msg);
     void processSetTimeConstrained(NetworkMessage *msg);
@@ -131,4 +131,4 @@
 
 #endif // CERTI_RTIG_HH
 
-// $Id: RTIG.hh,v 3.23 2008/02/27 16:38:27 rousse Exp $
+// $Id: RTIG.hh,v 3.24 2008/04/08 14:18:18 rousse Exp $

Index: RTIG/RTIG_processing.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/RTIG_processing.cc,v
retrieving revision 3.60
retrieving revision 3.61
diff -u -b -r3.60 -r3.61
--- RTIG/RTIG_processing.cc     8 Apr 2008 08:50:23 -0000       3.60
+++ RTIG/RTIG_processing.cc     8 Apr 2008 14:18:18 -0000       3.61
@@ -18,7 +18,7 @@
 // along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// $Id: RTIG_processing.cc,v 3.60 2008/04/08 08:50:23 rousse Exp $
+// $Id: RTIG_processing.cc,v 3.61 2008/04/08 14:18:18 rousse Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -324,9 +324,10 @@
 // ----------------------------------------------------------------------------
 //! Removes a federate from federation.
 void
-RTIG::processResignFederation(Handle federation,
+RTIG::processResignFederation(Socket *link,Handle federation,
                               FederateHandle federe)
 {
+    NetworkMessage reponse ;
 
     G.Out(pdGendoc,"BEGIN ** RESIGN FEDERATION SERVICE **");
     G.Out(pdGendoc,"enter RTIG::processResignFederation");
@@ -336,6 +337,14 @@
           federe, federation);
 
     auditServer << "Federate " << federe << " resign 
federation("<<federation<<")" ;
+
+    // Send answer to RTIA
+    reponse.exception = e_NO_EXCEPTION ;
+    reponse.type = NetworkMessage::RESIGN_FEDERATION_EXECUTION ;
+    reponse.federate = federe ;
+    reponse.federation = federation ;
+    reponse.write(link);
+
     G.Out(pdGendoc,"exit RTIG::processResignFederation");
     G.Out(pdGendoc,"END ** RESIGN FEDERATION SERVICE **");
 
@@ -1468,4 +1477,4 @@
 
 }} // namespace certi/rtig
 
-// $Id: RTIG_processing.cc,v 3.60 2008/04/08 08:50:23 rousse Exp $
+// $Id: RTIG_processing.cc,v 3.61 2008/04/08 14:18:18 rousse Exp $




reply via email to

[Prev in Thread] Current Thread [Next in Thread]