certi-cvs
[Top][All Lists]
Advanced

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

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


From: CERTI CVS commits
Subject: [certi-cvs] certi/libCERTI SocketUDP.cc SocketUDP.hh
Date: Wed, 04 Sep 2013 07:50:58 +0000

CVSROOT:        /sources/certi
Module name:    certi
Changes by:     Eric NOULARD <erk>      13/09/04 07:50:58

Modified files:
        libCERTI       : SocketUDP.cc SocketUDP.hh 

Log message:
        Calm down some compiler warning about initialization

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/SocketUDP.cc?cvsroot=certi&r1=3.30&r2=3.31
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/SocketUDP.hh?cvsroot=certi&r1=3.14&r2=3.15

Patches:
Index: SocketUDP.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/SocketUDP.cc,v
retrieving revision 3.30
retrieving revision 3.31
diff -u -b -r3.30 -r3.31
--- SocketUDP.cc        12 Nov 2010 07:32:33 -0000      3.30
+++ SocketUDP.cc        4 Sep 2013 07:50:52 -0000       3.31
@@ -182,17 +182,26 @@
 }
 
 // ----------------------------------------------------------------------------
-SocketUDP::SocketUDP()
-{
-_est_init_udp = false ;
-    _socket_udp = 0;
+SocketUDP::SocketUDP() {
 
-hp_distant = NULL ;
-PhysicalLink = true ;
+    PhysicalLink = true ;
+
+    _socket_udp = 0;
 
-BufferSize = 0 ;
-SentBytesCount = 0 ;
-RcvdBytesCount = 0 ;
+    memset(&sock_local, 0, sizeof(struct sockaddr_in));
+    memset(&sock_source, 0, sizeof(struct sockaddr_in));
+    Addr_Source = NULL;
+    Port_Source = 0;
+
+    memset(&sock_distant, 0, sizeof(struct sockaddr_in));
+    hp_distant   = NULL;
+
+    _sock_local_length = 0;
+    _est_init_udp      = false;
+
+    SentBytesCount = 0;
+    RcvdBytesCount = 0;
+    BufferSize     = 0;
 
 #ifdef _WIN32                                                          //netDot
        SocketTCP::winsockStartup();
@@ -202,7 +211,7 @@
 // ----------------------------------------------------------------------------
 SocketUDP::~SocketUDP()
 {
-// Fermeture
+// Closing the socket
 if (_est_init_udp)
        close();
 

Index: SocketUDP.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/SocketUDP.hh,v
retrieving revision 3.14
retrieving revision 3.15
diff -u -b -r3.14 -r3.15



reply via email to

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