[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
certi RTIA/FederationManagement.cc RTIA/RTIA_fe...
From: |
certi-cvs |
Subject: |
certi RTIA/FederationManagement.cc RTIA/RTIA_fe... |
Date: |
Tue, 12 Feb 2008 14:26:43 +0000 |
CVSROOT: /sources/certi
Module name: certi
Changes by: ROUSSELOT <rousse> 08/02/12 14:26:43
Modified files:
RTIA : FederationManagement.cc RTIA_federate.cc
RTIA_network.cc
RTIG : Federation.cc RTIG.cc RTIG_processing.cc
libCERTI : Message.cc NetworkMessage.cc SocketServer.cc
SocketTCP.cc
libRTI : RTIambassador.cc
Log message:
Some corrections about restore federation.A few debug traces added..
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/FederationManagement.cc?cvsroot=certi&r1=3.42&r2=3.43
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/RTIA_federate.cc?cvsroot=certi&r1=3.60&r2=3.61
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/RTIA_network.cc?cvsroot=certi&r1=3.19&r2=3.20
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/Federation.cc?cvsroot=certi&r1=3.77&r2=3.78
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG.cc?cvsroot=certi&r1=3.32&r2=3.33
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG_processing.cc?cvsroot=certi&r1=3.49&r2=3.50
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Message.cc?cvsroot=certi&r1=3.45&r2=3.46
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/NetworkMessage.cc?cvsroot=certi&r1=3.25&r2=3.26
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/SocketServer.cc?cvsroot=certi&r1=3.12&r2=3.13
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/SocketTCP.cc?cvsroot=certi&r1=3.20&r2=3.21
http://cvs.savannah.gnu.org/viewcvs/certi/libRTI/RTIambassador.cc?cvsroot=certi&r1=3.66&r2=3.67
Patches:
Index: RTIA/FederationManagement.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/FederationManagement.cc,v
retrieving revision 3.42
retrieving revision 3.43
diff -u -b -r3.42 -r3.43
--- RTIA/FederationManagement.cc 10 Feb 2008 18:19:11 -0000 3.42
+++ RTIA/FederationManagement.cc 12 Feb 2008 14:26:42 -0000 3.43
@@ -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.42 2008/02/10 18:19:11 rousse Exp $
+// $Id: FederationManagement.cc,v 3.43 2008/02/12 14:26:42 rousse Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -53,6 +53,7 @@
FederationManagement::FederationManagement(Communications *GC, Statistics*
stat)
: savingState(false), restoringState(false)
{
+ G.Out(pdGendoc,"enter FederationManagement::FederationManagement");
comm = GC ;
this->stat = stat ;
tm = NULL ;
@@ -68,6 +69,7 @@
_nom_federation = NULL ;
_nom_federe[0] = 0 ;
_FEDid = NULL ;
+ G.Out(pdGendoc,"exit FederationManagement::FederationManagement");
}
// ----------------------------------------------------------------------------
@@ -994,4 +996,4 @@
}} // namespace certi/rtia
-// $Id: FederationManagement.cc,v 3.42 2008/02/10 18:19:11 rousse Exp $
+// $Id: FederationManagement.cc,v 3.43 2008/02/12 14:26:42 rousse Exp $
Index: RTIA/RTIA_federate.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/RTIA_federate.cc,v
retrieving revision 3.60
retrieving revision 3.61
diff -u -b -r3.60 -r3.61
--- RTIA/RTIA_federate.cc 10 Feb 2008 18:19:12 -0000 3.60
+++ RTIA/RTIA_federate.cc 12 Feb 2008 14:26:42 -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: RTIA_federate.cc,v 3.60 2008/02/10 18:19:12 rousse Exp $
+// $Id: RTIA_federate.cc,v 3.61 2008/02/12 14:26:42 rousse Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -80,6 +80,7 @@
case Message::FEDERATE_RESTORE_COMPLETE:
case Message::FEDERATE_RESTORE_NOT_COMPLETE:
fm->checkFederationSaving();
+ break ;
default:
fm->checkFederationSaving();
fm->checkFederationRestoring();
@@ -272,7 +273,7 @@
D.Out(pdTrace, "Receiving Message from Federate, type"
" FederateRestore(Not)Complete.");
- bool result = req->type == Message::FEDERATE_SAVE_COMPLETE ;
+ bool result = req->type == Message::FEDERATE_RESTORE_COMPLETE ;
if (result)
{
G.Out(pdGendoc,"chooseFederateProcessing
FEDERATE_RETORE_COMPLETE");
@@ -1282,4 +1283,4 @@
}} // namespace certi/rtia
-// $Id: RTIA_federate.cc,v 3.60 2008/02/10 18:19:12 rousse Exp $
+// $Id: RTIA_federate.cc,v 3.61 2008/02/12 14:26:42 rousse Exp $
Index: RTIA/RTIA_network.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/RTIA_network.cc,v
retrieving revision 3.19
retrieving revision 3.20
diff -u -b -r3.19 -r3.20
--- RTIA/RTIA_network.cc 1 Feb 2008 14:12:22 -0000 3.19
+++ RTIA/RTIA_network.cc 12 Feb 2008 14:26:42 -0000 3.20
@@ -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: RTIA_network.cc,v 3.19 2008/02/01 14:12:22 rousse Exp $
+// $Id: RTIA_network.cc,v 3.20 2008/02/12 14:26:42 rousse Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -305,34 +305,34 @@
D.Out(pdTrace, "Receiving Message from RTIG, "
" type RequestFederationRestoreSucceeded.");
G.Out(pdGendoc,"processNetworkMessage for
REQUEST_FEDERATION_RESTORE_SUCCEEDED");
- queues->insertBeginCommand(msg);
+ queues->insertLastCommand(msg);
break ;
case NetworkMessage::REQUEST_FEDERATION_RESTORE_FAILED:
D.Out(pdTrace, "Receiving Message from RTIG, "
" type RequestFederationRestoreFailed.");
G.Out(pdGendoc,"processNetworkMessage for
REQUEST_FEDERATION_RESTORE_FAILED");
- queues->insertBeginCommand(msg);
+ queues->insertLastCommand(msg);
break ;
case NetworkMessage::FEDERATION_RESTORE_BEGUN:
D.Out(pdTrace, "Receiving Message from RTIG, "
" type FederationRestoreBegun.");
- queues->insertBeginCommand(msg);
+ queues->insertLastCommand(msg);
break ;
case NetworkMessage::INITIATE_FEDERATE_RESTORE:
D.Out(pdTrace, "Receiving Message from RTIG, "
" type InitiateFederateRestore.");
G.Out(pdGendoc,"processNetworkMessage for INITIATE_FEDERATE_RESTORE");
- queues->insertBeginCommand(msg);
+ queues->insertLastCommand(msg);
break ;
case NetworkMessage::FEDERATION_RESTORED:
case NetworkMessage::FEDERATION_NOT_RESTORED:
D.Out(pdTrace, "Receiving Message from RTIG, "
" type Federation(Not)Restored.");
- queues->insertBeginCommand(msg);
+ queues->insertLastCommand(msg);
break ;
default:
@@ -350,4 +350,4 @@
}} // namespace certi/rtia
-// $Id: RTIA_network.cc,v 3.19 2008/02/01 14:12:22 rousse Exp $
+// $Id: RTIA_network.cc,v 3.20 2008/02/12 14:26:42 rousse Exp $
Index: RTIG/Federation.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/Federation.cc,v
retrieving revision 3.77
retrieving revision 3.78
diff -u -b -r3.77 -r3.78
--- RTIG/Federation.cc 1 Feb 2008 14:12:22 -0000 3.77
+++ RTIG/Federation.cc 12 Feb 2008 14:26:42 -0000 3.78
@@ -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: Federation.cc,v 3.77 2008/02/01 14:12:22 rousse Exp $
+// $Id: Federation.cc,v 3.78 2008/02/12 14:26:42 rousse Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -138,12 +138,11 @@
MCLink = mc_link ;
#endif // FEDERATION_USES_MULTICAST // --------------
+ G.Out(pdGendoc,"enter Federation::Federation");
// Allocates Name
- if ((federation_name == 0) || (federation_handle == 0))
+ if ((federation_name == NULL) || (federation_handle == 0))
throw RTIinternalError("Null init parameter in Federation creation.");
- G.Out(pdGendoc,"enter Federation::Federation");
-
name = strdup(federation_name);
// Default Attribute values
@@ -2270,5 +2269,5 @@
}} // namespace certi/rtig
-// $Id: Federation.cc,v 3.77 2008/02/01 14:12:22 rousse Exp $
+// $Id: Federation.cc,v 3.78 2008/02/12 14:26:42 rousse Exp $
Index: RTIG/RTIG.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/RTIG.cc,v
retrieving revision 3.32
retrieving revision 3.33
diff -u -b -r3.32 -r3.33
--- RTIG/RTIG.cc 29 Jan 2008 14:30:51 -0000 3.32
+++ RTIG/RTIG.cc 12 Feb 2008 14:26:42 -0000 3.33
@@ -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.32 2008/01/29 14:30:51 rousse Exp $
+// $Id: RTIG.cc,v 3.33 2008/02/12 14:26:42 rousse Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -43,6 +43,7 @@
namespace rtig {
static pdCDebug D("RTIG", __FILE__);
+static PrettyDebug G("GENDOC",__FILE__);
// ----------------------------------------------------------------------------
// Constructor
@@ -83,7 +84,7 @@
Socket*
RTIG::chooseProcessingMethod(Socket *link, NetworkMessage *msg)
{
-
+ G.Out(pdGendoc,"enter RTIG::chooseProcessingMethod");
// This may throw a security error.
socketServer.checkMessage(link->returnSocket(), msg);
@@ -366,7 +367,7 @@
D.Out(pdError, "processMessageRecu: unknown type %u.", msg->type);
throw RTIinternalError("Unknown Message Type");
}
-
+ G.Out(pdGendoc,"exit RTIG::chooseProcessingMethod");
return link ; // It may have been set to NULL by closeConnection.
}
@@ -503,6 +504,7 @@
NetworkMessage rep ; // Server Answer(only if an exception is raised)
char buffer[BUFFER_EXCEPTION_REASON_SIZE] ; // To store the exception
reason
+ G.Out(pdGendoc,"enter RTIG::processIncomingMessage");
if (link == NULL) {
D.Out(pdError, "NULL socket in processMessageRecu.");
return NULL ;
@@ -959,7 +961,7 @@
"RTIG catched exception %d and sent it back to federate %d.",
rep.exception, rep.federate);
}
-
+ G.Out(pdGendoc,"exit RTIG::processIncomingMessage");
return link ;
}
@@ -978,4 +980,4 @@
}} // namespace certi/rtig
-// $Id: RTIG.cc,v 3.32 2008/01/29 14:30:51 rousse Exp $
+// $Id: RTIG.cc,v 3.33 2008/02/12 14:26:42 rousse Exp $
Index: RTIG/RTIG_processing.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/RTIG_processing.cc,v
retrieving revision 3.49
retrieving revision 3.50
diff -u -b -r3.49 -r3.50
--- RTIG/RTIG_processing.cc 1 Feb 2008 14:12:22 -0000 3.49
+++ RTIG/RTIG_processing.cc 12 Feb 2008 14:26:42 -0000 3.50
@@ -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.49 2008/02/01 14:12:22 rousse Exp $
+// $Id: RTIG_processing.cc,v 3.50 2008/02/12 14:26:42 rousse Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -44,8 +44,8 @@
char *FEDid = req->FEDid ;
NetworkMessage rep ; // rep for answer to RTIA
- G.Out(pdGendoc,"BEGIN ** CREATE FEDERATION SERVICE **");
G.Out(pdGendoc,"enter RTIG::processCreateFederation");
+ G.Out(pdGendoc,"BEGIN ** CREATE FEDERATION SERVICE **");
if (federation == NULL)
{
@@ -111,15 +111,15 @@
strcpy(rep.federationName,federation);
}
- G.Out(pdGendoc,"processCreateFederation===>write");
+ G.Out(pdGendoc,"processCreateFederation===>write answer to RTIA");
rep.write(link); // Send answer to RTIA
D.Out(pdInit, "Federation \"%s\" created with Handle %d.",
federation, rep.federation);
- G.Out(pdGendoc,"exit RTIG::processCreateFederation");
G.Out(pdGendoc,"END ** CREATE FEDERATION SERVICE **");
+ G.Out(pdGendoc,"exit RTIG::processCreateFederation");
}
// ----------------------------------------------------------------------------
@@ -1345,4 +1345,4 @@
}} // namespace certi/rtig
-// $Id: RTIG_processing.cc,v 3.49 2008/02/01 14:12:22 rousse Exp $
+// $Id: RTIG_processing.cc,v 3.50 2008/02/12 14:26:42 rousse Exp $
Index: libCERTI/Message.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/Message.cc,v
retrieving revision 3.45
retrieving revision 3.46
diff -u -b -r3.45 -r3.46
--- libCERTI/Message.cc 10 Feb 2008 18:19:12 -0000 3.45
+++ libCERTI/Message.cc 12 Feb 2008 14:26:43 -0000 3.46
@@ -641,8 +641,8 @@
{
printf(" -- MESSAGE - %s -", s);
if ( type == CREATE_FEDERATION_EXECUTION )
- printf("CREATE_FEDERATION_EXECUTION : federation %s : filename %s\n",
-
((federationName==NULL)?"empty":federationName),((FEDid==NULL)?"empty":FEDid)) ;
+ printf("CREATE_FEDERATION_EXECUTION : federationName %s : filename %s
federateHandle %d \n",
+
((federationName==NULL)?"empty":federationName),((FEDid==NULL)?"empty":FEDid),federate)
;
if ( type == DESTROY_FEDERATION_EXECUTION )
printf("DESTROY_FEDERATION_EXECUTION : federation %s : \n",
((federationName==NULL)?"empty":federationName)) ;
Index: libCERTI/NetworkMessage.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/NetworkMessage.cc,v
retrieving revision 3.25
retrieving revision 3.26
diff -u -b -r3.25 -r3.26
--- libCERTI/NetworkMessage.cc 17 Dec 2007 16:01:25 -0000 3.25
+++ libCERTI/NetworkMessage.cc 12 Feb 2008 14:26:43 -0000 3.26
@@ -16,7 +16,7 @@
// License along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: NetworkMessage.cc,v 3.25 2007/12/17 16:01:25 rousse Exp $
+// $Id: NetworkMessage.cc,v 3.26 2008/02/12 14:26:43 rousse Exp $
// ----------------------------------------------------------------------------
@@ -38,7 +38,8 @@
{
printf(" -- NETWORK MESSAGE - %s -", s);
if ( type == CREATE_FEDERATION_EXECUTION )
- printf("CREATE_FEDERATION_EXECUTION : federation %s : filename
%s\n",federationName,FEDid);
+ printf("CREATE_FEDERATION_EXECUTION : federationName %s : filename %s
:"
+ " federateHandle %d : federationHandle
%d\n",federationName,FEDid,federate,federation);
else if (type == JOIN_FEDERATION_EXECUTION )
printf("JOIN_FEDERATION_EXECUTION : federation %s : federate %s
\n",federationName,federateName);
else if (type == GET_FED_FILE )
@@ -354,4 +355,4 @@
} // namespace certi
-// $Id: NetworkMessage.cc,v 3.25 2007/12/17 16:01:25 rousse Exp $
+// $Id: NetworkMessage.cc,v 3.26 2008/02/12 14:26:43 rousse Exp $
Index: libCERTI/SocketServer.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/SocketServer.cc,v
retrieving revision 3.12
retrieving revision 3.13
diff -u -b -r3.12 -r3.13
--- libCERTI/SocketServer.cc 6 Jul 2007 09:25:18 -0000 3.12
+++ libCERTI/SocketServer.cc 12 Feb 2008 14:26:43 -0000 3.13
@@ -19,16 +19,17 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: SocketServer.cc,v 3.12 2007/07/06 09:25:18 erk Exp $
+// $Id: SocketServer.cc,v 3.13 2008/02/12 14:26:43 rousse Exp $
// ----------------------------------------------------------------------------
#include "SocketServer.hh"
+#include "PrettyDebug.hh"
using std::list ;
namespace certi {
-
+static PrettyDebug G("GENDOC",__FILE__);
// ----------------------------------------------------------------------------
/** This method is called when the RTIG wants to initialize its
FD_SET before doing a select. It will add all open socket to the set.
@@ -60,8 +61,12 @@
SocketServer::checkMessage(long socket_number, NetworkMessage *message) const
throw (SecurityError)
{
+ G.Out(pdGendoc,"enter SocketServer::checkMessage");
if ((message->federation == 0) && (message->federate == 0))
+ {
+ G.Out(pdGendoc,"exit SocketServer::checkMessage on return");
return ;
+ }
Socket *socket ;
try {
@@ -77,6 +82,7 @@
// BUG: Should put a line in the Audit.
throw SecurityError("Message has a forged origin.");
}
+ G.Out(pdGendoc,"exit SocketServer::checkMessage");
}
// ----------------------------------------------------------------------------
@@ -320,4 +326,4 @@
}
-// $Id: SocketServer.cc,v 3.12 2007/07/06 09:25:18 erk Exp $
+// $Id: SocketServer.cc,v 3.13 2008/02/12 14:26:43 rousse Exp $
Index: libCERTI/SocketTCP.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/SocketTCP.cc,v
retrieving revision 3.20
retrieving revision 3.21
diff -u -b -r3.20 -r3.21
--- libCERTI/SocketTCP.cc 9 Dec 2007 16:46:50 -0000 3.20
+++ libCERTI/SocketTCP.cc 12 Feb 2008 14:26:43 -0000 3.21
@@ -17,7 +17,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: SocketTCP.cc,v 3.20 2007/12/09 16:46:50 erk Exp $
+// $Id: SocketTCP.cc,v 3.21 2008/02/12 14:26:43 rousse Exp $
// ----------------------------------------------------------------------------
#ifdef _WIN32
@@ -43,7 +43,7 @@
namespace certi {
static pdCDebug D("SOCKTCP", "(SocketTCP) - ");
-
+static PrettyDebug G("GENDOC",__FILE__);
#ifdef _WIN32
int SocketTCP::winsockInits = 0;
@@ -500,6 +500,7 @@
SocketTCP::receive(void *buffer, unsigned long size)
throw (NetworkError,
NetworkSignal)
{
+G.Out(pdGendoc,"enter SocketTCP::receive");
assert(_est_init_tcp);
long nReceived = 0 ;
@@ -556,6 +557,7 @@
memmove((void *) ReadBuffer, (void *)(ReadBuffer + size), RBLength -
size);
RBLength -= size ;
#endif
+G.Out(pdGendoc,"exit SocketTCP::receive");
}
// ----------------------------------------------------------------------------
@@ -619,4 +621,4 @@
} // namespace
-// $Id: SocketTCP.cc,v 3.20 2007/12/09 16:46:50 erk Exp $
+// $Id: SocketTCP.cc,v 3.21 2008/02/12 14:26:43 rousse Exp $
Index: libRTI/RTIambassador.cc
===================================================================
RCS file: /sources/certi/certi/libRTI/RTIambassador.cc,v
retrieving revision 3.66
retrieving revision 3.67
diff -u -b -r3.66 -r3.67
--- libRTI/RTIambassador.cc 11 Feb 2008 14:33:26 -0000 3.66
+++ libRTI/RTIambassador.cc 12 Feb 2008 14:26:43 -0000 3.67
@@ -19,7 +19,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: RTIambassador.cc,v 3.66 2008/02/11 14:33:26 erk Exp $
+// $Id: RTIambassador.cc,v 3.67 2008/02/12 14:26:43 rousse Exp $
// ----------------------------------------------------------------------------
@@ -96,6 +96,7 @@
RTI::RTIambassador::RTIambassador()
throw (MemoryExhausted, RTIinternalError)
{
+ G.Out(pdGendoc,"enter RTIambassador::RTIambassador");
PrettyDebug::setFederateName( "Federate" );
std::stringstream msg;
@@ -175,6 +176,7 @@
break ;
}
#endif
+ G.Out(pdGendoc,"exit RTIambassador::RTIambassador");
}
// ----------------------------------------------------------------------------
@@ -2906,4 +2908,4 @@
privateRefs->executeService(&req, &rep);
}
-// $Id: RTIambassador.cc,v 3.66 2008/02/11 14:33:26 erk Exp $
+// $Id: RTIambassador.cc,v 3.67 2008/02/12 14:26:43 rousse Exp $