[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: |
Sun, 10 Feb 2008 18:19:14 +0000 |
CVSROOT: /sources/certi
Module name: certi
Changes by: ROUSSELOT <rousse> 08/02/10 18:19:14
Modified files:
RTIA : FederationManagement.cc RTIA_federate.cc
libCERTI : Message.cc Message_W.cc SocketUN.cc
libRTI : RTIambassador.cc
Log message:
Enhancement of reason exception on create federation execution
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/FederationManagement.cc?cvsroot=certi&r1=3.41&r2=3.42
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/RTIA_federate.cc?cvsroot=certi&r1=3.59&r2=3.60
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Message.cc?cvsroot=certi&r1=3.44&r2=3.45
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Message_W.cc?cvsroot=certi&r1=3.14&r2=3.15
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/SocketUN.cc?cvsroot=certi&r1=3.18&r2=3.19
http://cvs.savannah.gnu.org/viewcvs/certi/libRTI/RTIambassador.cc?cvsroot=certi&r1=3.64&r2=3.65
Patches:
Index: RTIA/FederationManagement.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/FederationManagement.cc,v
retrieving revision 3.41
retrieving revision 3.42
diff -u -b -r3.41 -r3.42
--- RTIA/FederationManagement.cc 1 Feb 2008 14:12:21 -0000 3.41
+++ RTIA/FederationManagement.cc 10 Feb 2008 18:19:11 -0000 3.42
@@ -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.41 2008/02/01 14:12:21 rousse Exp $
+// $Id: FederationManagement.cc,v 3.42 2008/02/10 18:19:11 rousse Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -117,8 +117,16 @@
e = e_NO_EXCEPTION ;
// BUG: pour l'instant, le federe ne peut creer q'une federation
- if (_est_createur_federation || _est_membre_federation)
+ if (_est_createur_federation)
+ {
+ std::cout<<"Federate "<<_nom_federe<<" is yet a federation
creator"<<std::endl;
e = e_RTIinternalError ;
+ }
+ else if (_est_membre_federation)
+ {
+ std::cout<<"Federate "<<_nom_federe<<" is yet a federation
member"<<std::endl;
+ e = e_RTIinternalError ;
+ }
if (e == e_NO_EXCEPTION)
{
@@ -197,7 +205,7 @@
e = e_NO_EXCEPTION ;
- // BUG: On devrait pouvoir detruire une federation meme si on est
+ // BUG: On devrait pouvoir detruire une federation meme si on n'est
// pas le createur.
if (!_est_createur_federation || strcmp(theName, _nom_federation))
e = e_FederationExecutionDoesNotExist ;
@@ -986,4 +994,4 @@
}} // namespace certi/rtia
-// $Id: FederationManagement.cc,v 3.41 2008/02/01 14:12:21 rousse Exp $
+// $Id: FederationManagement.cc,v 3.42 2008/02/10 18:19:11 rousse Exp $
Index: RTIA/RTIA_federate.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/RTIA_federate.cc,v
retrieving revision 3.59
retrieving revision 3.60
diff -u -b -r3.59 -r3.60
--- RTIA/RTIA_federate.cc 1 Feb 2008 14:12:22 -0000 3.59
+++ RTIA/RTIA_federate.cc 10 Feb 2008 18:19:12 -0000 3.60
@@ -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.59 2008/02/01 14:12:22 rousse Exp $
+// $Id: RTIA_federate.cc,v 3.60 2008/02/10 18:19:12 rousse Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -44,6 +44,7 @@
RTIA::saveAndRestoreStatus(Message::Type type)
throw (SaveInProgress, RestoreInProgress)
{
+G.Out(pdGendoc,"enter RTIA::saveAndRestoreStatus");
//D.Mes(pdMessage, 'N', type);
switch (type) {
@@ -83,6 +84,7 @@
fm->checkFederationSaving();
fm->checkFederationRestoring();
}
+G.Out(pdGendoc,"exit RTIA::saveAndRestoreStatus");
}
// ----------------------------------------------------------------------------
@@ -107,6 +109,10 @@
fm->_FEDid = new char[strlen(req->getFEDid())+1] ;
strcpy(fm->_FEDid, req->getFEDid()) ;
fm->createFederationExecution(req->getFederationName(), e);
+ if ( e == e_RTIinternalError )
+ {
+ rep.setException(e,"Federate is yet a creator or a member !");
+ }
D.Out(pdTrace, "Receiving Message from Federate, "
"type CreateFederation done.");
// RTIA needs FEDid into the answer (rep Message) to federate
@@ -933,6 +939,7 @@
try {
TypeException exc ;
chooseFederateProcessing(req, rep, exc);
+ if ( exc != e_RTIinternalError )
rep.setException(exc);
}
catch (ArrayIndexOutOfBounds &e) {
@@ -1275,4 +1282,4 @@
}} // namespace certi/rtia
-// $Id: RTIA_federate.cc,v 3.59 2008/02/01 14:12:22 rousse Exp $
+// $Id: RTIA_federate.cc,v 3.60 2008/02/10 18:19:12 rousse Exp $
Index: libCERTI/Message.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/Message.cc,v
retrieving revision 3.44
retrieving revision 3.45
diff -u -b -r3.44 -r3.45
--- libCERTI/Message.cc 21 Dec 2007 14:29:41 -0000 3.44
+++ libCERTI/Message.cc 10 Feb 2008 18:19:12 -0000 3.45
@@ -653,6 +653,7 @@
printf(" type=%d :", type);
printf(" date=%f: ", fed_time.getTime());
printf(" exception=%d: ", exception);
+ printf(" reason=%s: ",exceptionReason);
printf(" objectClass=%ld: ", objectClass);
printf(" interactionClass=%ld:\n", interactionClass);
printf(" attribute=%ld:\n", attribute);
Index: libCERTI/Message_W.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/Message_W.cc,v
retrieving revision 3.14
retrieving revision 3.15
diff -u -b -r3.14 -r3.15
--- libCERTI/Message_W.cc 29 Jan 2008 14:30:51 -0000 3.14
+++ libCERTI/Message_W.cc 10 Feb 2008 18:19:13 -0000 3.15
@@ -17,7 +17,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: Message_W.cc,v 3.14 2008/01/29 14:30:51 rousse Exp $
+// $Id: Message_W.cc,v 3.15 2008/02/10 18:19:13 rousse Exp $
// ----------------------------------------------------------------------------
@@ -56,7 +56,7 @@
Message::writeBody(SocketUN *socket)
{
MessageBody body ;
- G.Out(pdGendoc,"enter Message::writeBody");
+ G.Out(pdGendoc,"enter Message::writeBody type %d",header.type);
// 0- Copy the Header at the beginning of the Body, in order to
// make a single Socket->Emettre call while sending both.
// WARNING: As the Body size is not known yet, we will have to
@@ -712,4 +712,4 @@
} // namespace certi
-// $Id: Message_W.cc,v 3.14 2008/01/29 14:30:51 rousse Exp $
+// $Id: Message_W.cc,v 3.15 2008/02/10 18:19:13 rousse Exp $
Index: libCERTI/SocketUN.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/SocketUN.cc,v
retrieving revision 3.18
retrieving revision 3.19
diff -u -b -r3.18 -r3.19
--- libCERTI/SocketUN.cc 27 Nov 2007 08:55:54 -0000 3.18
+++ libCERTI/SocketUN.cc 10 Feb 2008 18:19:13 -0000 3.19
@@ -44,7 +44,7 @@
using std::endl ;
namespace certi {
-
+static PrettyDebug G("GENDOC",__FILE__);
#define MAX_ATTEMPTS 3
// ----------------------------------------------------------------------------
@@ -296,6 +296,7 @@
long sent = 0 ;
unsigned long total_sent = 0 ;
+G.Out(pdGendoc,"enter SocketUN::send");
assert(_est_init_un);
pD->Out(pdTrace, "Beginning to send UN message...");
@@ -342,6 +343,7 @@
}
}
SentBytesCount += total_sent ;
+G.Out(pdGendoc,"exit SocketUN::send");
}
// ----------------------------------------------------------------------------
@@ -376,6 +378,8 @@
SocketUN::receive(const unsigned char *buffer, size_t Size)
throw (NetworkError, NetworkSignal)
{
+G.Out(pdGendoc,"enter SocketUN::receive");
+
assert(_est_init_un);
long nReceived = 0 ;
@@ -450,6 +454,7 @@
RBLength - Size);
RBLength -= Size ;
#endif
+G.Out(pdGendoc,"exit SocketUN::receive");
}
} // namespace certi
Index: libRTI/RTIambassador.cc
===================================================================
RCS file: /sources/certi/certi/libRTI/RTIambassador.cc,v
retrieving revision 3.64
retrieving revision 3.65
diff -u -b -r3.64 -r3.65
--- libRTI/RTIambassador.cc 1 Feb 2008 14:12:23 -0000 3.64
+++ libRTI/RTIambassador.cc 10 Feb 2008 18:19:13 -0000 3.65
@@ -19,7 +19,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: RTIambassador.cc,v 3.64 2008/02/01 14:12:23 rousse Exp $
+// $Id: RTIambassador.cc,v 3.65 2008/02/10 18:19:13 rousse Exp $
// ----------------------------------------------------------------------------
@@ -96,7 +96,7 @@
RTI::RTIambassador::RTIambassador()
throw (MemoryExhausted, RTIinternalError)
{
- PrettyDebug::setFederateName( "Federate-process" );
+ PrettyDebug::setFederateName( "Federate" );
std::stringstream msg;
privateRefs = new RTIambPrivateRefs();
@@ -2899,4 +2899,4 @@
privateRefs->executeService(&req, &rep);
}
-// $Id: RTIambassador.cc,v 3.64 2008/02/01 14:12:23 rousse Exp $
+// $Id: RTIambassador.cc,v 3.65 2008/02/10 18:19:13 rousse Exp $