certi-cvs
[Top][All Lists]
Advanced

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

[certi-cvs] certi libCERTI/SocketUDP.cc libCERTI/SocketTCP....


From: CERTI CVS commits
Subject: [certi-cvs] certi libCERTI/SocketUDP.cc libCERTI/SocketTCP....
Date: Wed, 16 Apr 2014 12:24:02 +0000

CVSROOT:        /sources/certi
Module name:    certi
Changes by:     Eric NOULARD <erk>      14/04/16 12:24:01

Modified files:
        libCERTI       : SocketUDP.cc SocketTCP.hh SocketUDP.hh 
                         SocketServer.hh SocketTCP.cc SocketServer.cc 
        RTIG           : RTIG.cc 

Log message:
        Clean-up the code a little bit

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/SocketUDP.cc?cvsroot=certi&r1=3.32&r2=3.33
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/SocketTCP.hh?cvsroot=certi&r1=3.25&r2=3.26
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/SocketUDP.hh?cvsroot=certi&r1=3.16&r2=3.17
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/SocketServer.hh?cvsroot=certi&r1=3.10&r2=3.11
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/SocketTCP.cc?cvsroot=certi&r1=3.36&r2=3.37
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/SocketServer.cc?cvsroot=certi&r1=3.20&r2=3.21
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG.cc?cvsroot=certi&r1=3.72&r2=3.73

Patches:
Index: libCERTI/SocketUDP.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/SocketUDP.cc,v
retrieving revision 3.32
retrieving revision 3.33
diff -u -b -r3.32 -r3.33
--- libCERTI/SocketUDP.cc       27 Sep 2013 13:04:32 -0000      3.32
+++ libCERTI/SocketUDP.cc       16 Apr 2014 12:24:01 -0000      3.33
@@ -136,7 +136,7 @@
 // ----------------------------------------------------------------------------
 //! create an UDP server.
 void
-SocketUDP::createUDPServer(unsigned int port, in_addr_t addr)
+SocketUDP::createServer(unsigned int port, in_addr_t addr)
     throw (NetworkError, NetworkSignal)
 {
   assert(!_est_init_udp);
@@ -149,13 +149,11 @@
    sock_local.sin_port   = htons((u_short)port);
 
    if (!open()) {
-       perror("SocketUDP: Open");
-       throw NetworkError("Cannot open UDP Socket");
+       throw NetworkError("Cannot open UDP 
Socket"+std::string(strerror(errno)));
    }
 
    if (!bind()) {
-       perror("SocketUDP: Bind");
-       throw NetworkError("Cannot bind UDP Socket");
+       throw NetworkError("Cannot bind UDP 
Socket"+std::string(strerror(errno)));
    }
 
 _est_init_udp = true ;

Index: libCERTI/SocketTCP.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/SocketTCP.hh,v
retrieving revision 3.25
retrieving revision 3.26
diff -u -b -r3.25 -r3.26
--- libCERTI/SocketTCP.hh       4 Sep 2013 12:53:02 -0000       3.25
+++ libCERTI/SocketTCP.hh       16 Apr 2014 12:24:01 -0000      3.26
@@ -50,7 +50,7 @@
     virtual void createConnection(const char *server_name, unsigned int port)
         throw (NetworkError);
        void createTCPClient(in_port_t port, in_addr_t addr) throw 
(NetworkError);
-       void createTCPServer(in_port_t port = 0, in_addr_t addr = INADDR_ANY) 
throw (NetworkError);
+       void createServer(in_port_t port = 0, in_addr_t addr = INADDR_ANY) 
throw (NetworkError);
 
        int accept(SocketTCP *serveur) throw (NetworkError);
        virtual void send(const unsigned char *, size_t)                throw 
(NetworkError, NetworkSignal);

Index: libCERTI/SocketUDP.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/SocketUDP.hh,v
retrieving revision 3.16
retrieving revision 3.17
diff -u -b -r3.16 -r3.17
--- libCERTI/SocketUDP.hh       27 Sep 2013 13:04:33 -0000      3.16
+++ libCERTI/SocketUDP.hh       16 Apr 2014 12:24:01 -0000      3.17
@@ -50,7 +50,7 @@
     virtual void createConnection(const char *server_name, unsigned int port)
         throw (NetworkError);
 
-       void createUDPServer(unsigned int port, in_addr_t addr = INADDR_ANY)
+       void createServer(unsigned int port, in_addr_t addr = INADDR_ANY)
        throw (NetworkError, NetworkSignal);
 
        void attach(int socket_ouvert, unsigned long Adresse, unsigned int port)

Index: libCERTI/SocketServer.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/SocketServer.hh,v
retrieving revision 3.10
retrieving revision 3.11
diff -u -b -r3.10 -r3.11
--- libCERTI/SocketServer.hh    22 Jun 2007 08:51:39 -0000      3.10
+++ libCERTI/SocketServer.hh    16 Apr 2014 12:24:01 -0000      3.11
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: SocketServer.hh,v 3.10 2007/06/22 08:51:39 erk Exp $
+// $Id: SocketServer.hh,v 3.11 2014/04/16 12:24:01 erk Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef _CERTI_SOCKET_SERVER_HH
@@ -64,7 +64,7 @@
 {
 public:
     SocketServer(SocketTCP *tcp_socket,
-                 SocketUDP *udp_socket, int the_port);
+                 SocketUDP *udp_socket);
 
     ~SocketServer();
 
@@ -114,7 +114,6 @@
     // The Server socket object(used for Accepts)
     SocketTCP *ServerSocketTCP ;
     SocketUDP *ServerSocketUDP ;
-    // int port ;
 
     // ---------------------
     // -- Private Methods --
@@ -127,4 +126,4 @@
 
 #endif // _CERTI_SOCKET_SERVER_HH
 
-// $Id: SocketServer.hh,v 3.10 2007/06/22 08:51:39 erk Exp $
+// $Id: SocketServer.hh,v 3.11 2014/04/16 12:24:01 erk Exp $

Index: libCERTI/SocketTCP.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/SocketTCP.cc,v
retrieving revision 3.36
retrieving revision 3.37
diff -u -b -r3.36 -r3.37
--- libCERTI/SocketTCP.cc       24 Sep 2013 14:27:51 -0000      3.36
+++ libCERTI/SocketTCP.cc       16 Apr 2014 12:24:01 -0000      3.37
@@ -301,7 +301,7 @@
 
 // ----------------------------------------------------------------------------
 void
-SocketTCP::createTCPServer(in_port_t port, in_addr_t addr)
+SocketTCP::createServer(in_port_t port, in_addr_t addr)
 throw (NetworkError)
 {
        assert(!_est_init_tcp);
@@ -580,4 +580,4 @@
 
 } // namespace
 
-// $Id: SocketTCP.cc,v 3.36 2013/09/24 14:27:51 erk Exp $
+// $Id: SocketTCP.cc,v 3.37 2014/04/16 12:24:01 erk Exp $

Index: libCERTI/SocketServer.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/SocketServer.cc,v
retrieving revision 3.20
retrieving revision 3.21
diff -u -b -r3.20 -r3.21
--- libCERTI/SocketServer.cc    1 Sep 2011 13:50:54 -0000       3.20
+++ libCERTI/SocketServer.cc    16 Apr 2014 12:24:01 -0000      3.21
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: SocketServer.cc,v 3.20 2011/09/01 13:50:54 erk Exp $
+// $Id: SocketServer.cc,v 3.21 2014/04/16 12:24:01 erk Exp $
 // ----------------------------------------------------------------------------
 
 
@@ -140,7 +140,7 @@
 // ----------------------------------------------------------------------------
 //! socketServer.
 SocketServer::SocketServer(SocketTCP *tcp_socket,
-                           SocketUDP *udp_socket, int /* the_port */)
+                           SocketUDP *udp_socket)
     : list<SocketTuple *>()
 {
     if (tcp_socket == NULL)
@@ -342,4 +342,4 @@
 
 }
 
-// $Id: SocketServer.cc,v 3.20 2011/09/01 13:50:54 erk Exp $
+// $Id: SocketServer.cc,v 3.21 2014/04/16 12:24:01 erk Exp $

Index: RTIG/RTIG.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/RTIG.cc,v
retrieving revision 3.72
retrieving revision 3.73
diff -u -b -r3.72 -r3.73
--- RTIG/RTIG.cc        27 Sep 2013 13:04:33 -0000      3.72
+++ RTIG/RTIG.cc        16 Apr 2014 12:24:01 -0000      3.73
@@ -51,10 +51,9 @@
 
 // ----------------------------------------------------------------------------
 // Constructor
-// Note (JYR) : udpPort modified AFTER used in socketServer(.) call, strange...
 RTIG::RTIG()
     :  federationHandles(1),
-      socketServer(&tcpSocketServer, &udpSocketServer, udpPort),
+      socketServer(&tcpSocketServer, &udpSocketServer),
       auditServer(RTIG_AUDIT_FILENAME),
       federations(socketServer, auditServer)
 {
@@ -475,13 +474,13 @@
     // listen only on specified interface (if any)
     //  1) listen on interface specified on the command line
     if (this->listeningIPAddress != 0) {
-        udpSocketServer.createUDPServer(udpPort, listeningIPAddress);
-        tcpSocketServer.createTCPServer(tcpPort, listeningIPAddress);
+        udpSocketServer.createServer(udpPort, listeningIPAddress);
+        tcpSocketServer.createServer(tcpPort, listeningIPAddress);
     }
     // default case on all network interfaces
     else {
-        udpSocketServer.createUDPServer(udpPort);
-        tcpSocketServer.createTCPServer(tcpPort);
+        udpSocketServer.createServer(udpPort);
+        tcpSocketServer.createServer(tcpPort);
     }
 
     if (verboseLevel>0) {
@@ -1072,4 +1071,4 @@
 
 }} // namespace certi/rtig
 
-// $Id: RTIG.cc,v 3.72 2013/09/27 13:04:33 erk Exp $
+// $Id: RTIG.cc,v 3.73 2014/04/16 12:24:01 erk Exp $



reply via email to

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