certi-cvs
[Top][All Lists]
Advanced

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

[certi-cvs] certi RTIG/Federation.cc libCERTI/SecurityServe...


From: certi-cvs
Subject: [certi-cvs] certi RTIG/Federation.cc libCERTI/SecurityServe...
Date: Fri, 27 Jun 2008 09:54:47 +0000

CVSROOT:        /sources/certi
Module name:    certi
Changes by:     ROUSSELOT <rousse>      08/06/27 09:54:47

Modified files:
        RTIG           : Federation.cc 
        libCERTI       : SecurityServer.cc SocketServer.cc 

Log message:
        #23725 BUG, avoid rtig crashes, but other works are needed

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/Federation.cc?cvsroot=certi&r1=3.94&r2=3.95
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/SecurityServer.cc?cvsroot=certi&r1=3.12&r2=3.13
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/SocketServer.cc?cvsroot=certi&r1=3.16&r2=3.17

Patches:
Index: RTIG/Federation.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/Federation.cc,v
retrieving revision 3.94
retrieving revision 3.95
diff -u -b -r3.94 -r3.95
--- RTIG/Federation.cc  24 Jun 2008 12:23:31 -0000      3.94
+++ RTIG/Federation.cc  27 Jun 2008 09:54:47 -0000      3.95
@@ -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.94 2008/06/24 12:23:31 rousse Exp $
+// $Id: Federation.cc,v 3.95 2008/06/27 09:54:47 rousse Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -2268,6 +2268,14 @@
         mess.handleArray[i] = theAttributeList[i] ;
         }
 
+     // JYR : BUG if getSocketLink return NULL means
+     // owner federate has been killed and so rtig don't crash
+     // better development needed
+     if ( server->getSocketLink(theOwnerHandle) == NULL )
+        {
+        throw ObjectNotKnown ( "Owner federate killed") ;
+        }
+
      mess.send(server->getSocketLink(theOwnerHandle),NM_msgBufSend);
  
    G.Out(pdGendoc,"            requestObjectOwner ===> write PAVU to RTIA %d"
@@ -2279,5 +2287,5 @@
 
 }} // namespace certi/rtig
 
-// $Id: Federation.cc,v 3.94 2008/06/24 12:23:31 rousse Exp $
+// $Id: Federation.cc,v 3.95 2008/06/27 09:54:47 rousse Exp $
 

Index: libCERTI/SecurityServer.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/SecurityServer.cc,v
retrieving revision 3.12
retrieving revision 3.13
diff -u -b -r3.12 -r3.13
--- libCERTI/SecurityServer.cc  16 Jun 2008 09:03:24 -0000      3.12
+++ libCERTI/SecurityServer.cc  27 Jun 2008 09:54:47 -0000      3.13
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: SecurityServer.cc,v 3.12 2008/06/16 09:03:24 rousse Exp $
+// $Id: SecurityServer.cc,v 3.13 2008/06/27 09:54:47 rousse Exp $
 // ----------------------------------------------------------------------------
 
 
@@ -33,6 +33,7 @@
 using std::endl ;
 
 static pdCDebug D("SECURITY_SERVER", __FILE__);
+static PrettyDebug G("GENDOC",__FILE__);
 
 namespace certi {
 
@@ -44,6 +45,7 @@
 SecurityServer::getSocketLink(FederateHandle theFederate,
                               TransportType theType) const
 {
+// G.Out(pdGendoc,"into SecurityServer::getSocketLink");
     return RTIG_SocketServer.getSocketLink(myFederation, theFederate, theType);
 }
 
@@ -190,4 +192,4 @@
 
 }
 
-// $Id: SecurityServer.cc,v 3.12 2008/06/16 09:03:24 rousse Exp $
+// $Id: SecurityServer.cc,v 3.13 2008/06/27 09:54:47 rousse Exp $

Index: libCERTI/SocketServer.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/SocketServer.cc,v
retrieving revision 3.16
retrieving revision 3.17
diff -u -b -r3.16 -r3.17
--- libCERTI/SocketServer.cc    23 Apr 2008 11:54:41 -0000      3.16
+++ libCERTI/SocketServer.cc    27 Jun 2008 09:54:47 -0000      3.17
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: SocketServer.cc,v 3.16 2008/04/23 11:54:41 rousse Exp $
+// $Id: SocketServer.cc,v 3.17 2008/06/27 09:54:47 rousse Exp $
 // ----------------------------------------------------------------------------
 
 
@@ -216,6 +216,8 @@
   this should not happen. In fact, when a Client(Federate) crashes, the
   RTIG is supposed be remove all references to this federate. That's the
   reason why a RTIinternalError is thrown in that case.
+
+  JYR : sorry but we return NULL (avoid rtig crash) because development needed
 */
 Socket*
 SocketServer::getSocketLink(Handle the_federation,
@@ -229,12 +231,18 @@
 
     if (the_type == RELIABLE) {
         if (tuple->ReliableLink == 0)
-            throw RTIinternalError("Reference to a killed Federate.");
+            {
+            return NULL ;
+            }
+            //throw RTIinternalError("Reference to a killed Federate.");
         return tuple->ReliableLink ;
     }
     else {
         if (tuple->BestEffortLink == 0)
-            throw RTIinternalError("Reference to a killed Federate.");
+            {
+            return NULL ;
+            }
+            //throw RTIinternalError("Reference to a killed Federate.");
         return tuple->BestEffortLink ;
     }
     // G.Out(pdGendoc,"exit  SocketServer::getSocketLink without return");
@@ -330,4 +338,4 @@
 
 }
 
-// $Id: SocketServer.cc,v 3.16 2008/04/23 11:54:41 rousse Exp $
+// $Id: SocketServer.cc,v 3.17 2008/06/27 09:54:47 rousse Exp $




reply via email to

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