certi-cvs
[Top][All Lists]
Advanced

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

certi/libRTI RTIambassador.cc RTIambPrivateRefs.cc


From: certi-cvs
Subject: certi/libRTI RTIambassador.cc RTIambPrivateRefs.cc
Date: Mon, 11 Feb 2008 14:33:27 +0000

CVSROOT:        /sources/certi
Module name:    certi
Changes by:     Eric NOULARD <erk>      08/02/11 14:33:27

Modified files:
        libRTI         : RTIambassador.cc RTIambPrivateRefs.cc 

Log message:
        Add more check about ConcurrentAccessAttempt and is_reentrant

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/libRTI/RTIambassador.cc?cvsroot=certi&r1=3.65&r2=3.66
http://cvs.savannah.gnu.org/viewcvs/certi/libRTI/RTIambPrivateRefs.cc?cvsroot=certi&r1=3.9&r2=3.10

Patches:
Index: RTIambassador.cc
===================================================================
RCS file: /sources/certi/certi/libRTI/RTIambassador.cc,v
retrieving revision 3.65
retrieving revision 3.66
diff -u -b -r3.65 -r3.66
--- RTIambassador.cc    10 Feb 2008 18:19:13 -0000      3.65
+++ RTIambassador.cc    11 Feb 2008 14:33:26 -0000      3.66
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: RTIambassador.cc,v 3.65 2008/02/10 18:19:13 rousse Exp $
+// $Id: RTIambassador.cc,v 3.66 2008/02/11 14:33:26 erk Exp $
 // ----------------------------------------------------------------------------
 
 
@@ -228,7 +228,7 @@
 
     // Throw exception if reentrant call.
     if (privateRefs->is_reentrant)
-        throw ConcurrentAccessAttempted("");
+        throw ConcurrentAccessAttempted("is_reentrant was true in 
RTI::RTIambassador::tick_kernel");
 
     privateRefs->is_reentrant = true ;
 
@@ -259,6 +259,7 @@
             cout << "tick 2." << endl ;
             cout << "LibRTI:: Catched NetworkError, throw RTIinternalError."
                  << endl ;
+            privateRefs->is_reentrant = false;
             throw RTIinternalError("RTI::RTIambassador::tick_kernel (tick2) : 
NetworkError-->RTIinternalError");
         }
 
@@ -496,21 +497,26 @@
             }
         }
         catch (InvalidFederationTime &e) {
+               privateRefs->is_reentrant = false;
             vers_RTI.setException(e_InvalidFederationTime, e._reason);
             throw ;
         }
         catch (TimeAdvanceWasNotInProgress &e) {
+               privateRefs->is_reentrant = false;
             vers_RTI.setException(e_TimeAdvanceWasNotInProgress, e._reason);
             throw ;
         }
         catch (FederationTimeAlreadyPassed &e) {
+               privateRefs->is_reentrant = false;
             vers_RTI.setException(e_FederationTimeAlreadyPassed, e._reason);
         }
         catch (FederateInternalError &e) {
+               privateRefs->is_reentrant = false;
             vers_RTI.setException(e_FederateInternalError, e._reason);
             throw ;
         }
         catch (Exception &e) {
+               privateRefs->is_reentrant = false;
             vers_RTI.setException(e_RTIinternalError, e._reason);
             throw ;
         }
@@ -525,6 +531,7 @@
             cout << "tick 3." << endl ;
             cout << "LibRTI:: Catched NetworkError, throw RTIinternalError."
                  << endl ;
+            privateRefs->is_reentrant = false;
             throw RTIinternalError("RTI::RTIambassador::tick_kernel (tick 3) : 
NetworkError-->RTIinternalError");
         }
     }
@@ -2899,4 +2906,4 @@
     privateRefs->executeService(&req, &rep);
 }
 
-// $Id: RTIambassador.cc,v 3.65 2008/02/10 18:19:13 rousse Exp $
+// $Id: RTIambassador.cc,v 3.66 2008/02/11 14:33:26 erk Exp $

Index: RTIambPrivateRefs.cc
===================================================================
RCS file: /sources/certi/certi/libRTI/RTIambPrivateRefs.cc,v
retrieving revision 3.9
retrieving revision 3.10
diff -u -b -r3.9 -r3.10
--- RTIambPrivateRefs.cc        11 Dec 2007 16:44:21 -0000      3.9
+++ RTIambPrivateRefs.cc        11 Feb 2008 14:33:27 -0000      3.10
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: RTIambPrivateRefs.cc,v 3.9 2007/12/11 16:44:21 rousse Exp $
+// $Id: RTIambPrivateRefs.cc,v 3.10 2008/02/11 14:33:27 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -76,6 +76,7 @@
     }
     catch (NetworkError) {
         std::cerr << "libRTI: exception: NetworkError (write)" << std::endl ;
+        is_reentrant = false;
         throw RTIinternalError("libRTI: Network Write Error");
     }
 
@@ -87,6 +88,7 @@
     }
     catch (NetworkError) {
         std::cerr << "libRTI: exception: NetworkError (read)" << std::endl ;
+        is_reentrant = false;
         throw RTIinternalError("libRTI: Network Read Error waiting RTI reply");
     }
 
@@ -94,6 +96,7 @@
 
     if (rep->type != req->type) {
         std::cout << "LibRTI: Assertion failed: rep->type != req->type" << 
std::endl ;
+        is_reentrant = false;
         throw RTIinternalError("RTIambPrivateRefs::executeService: "
                                "rep->type != req->type");
     }
@@ -547,4 +550,4 @@
     }
 }
 
-// $Id: RTIambPrivateRefs.cc,v 3.9 2007/12/11 16:44:21 rousse Exp $
+// $Id: RTIambPrivateRefs.cc,v 3.10 2008/02/11 14:33:27 erk Exp $




reply via email to

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