myserver-commit
[Top][All Lists]
Advanced

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

[myserver-commit] [SCM] GNU MyServer branch, master, updated. 0_9_1-57-g


From: Giuseppe Scrivano
Subject: [myserver-commit] [SCM] GNU MyServer branch, master, updated. 0_9_1-57-gc52b13a
Date: Wed, 10 Feb 2010 16:52:45 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  c52b13aca2ca45c61144b3aa3b58587838496118 (commit)
       via  9968a9eb67a41d011ff553b2afa009a99a5a36c7 (commit)
      from  38827a01d9360f56ba99e0e866985883506a4d78 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit c52b13aca2ca45c61144b3aa3b58587838496118
Author: Giuseppe Scrivano <address@hidden>
Date:   Wed Feb 10 17:51:11 2010 +0100

    Use SHUT_RDWR in place of SD_BOTH

diff --git a/myserver/src/connection/connection.cpp 
b/myserver/src/connection/connection.cpp
index ebee461..dc3d1b6 100644
--- a/myserver/src/connection/connection.cpp
+++ b/myserver/src/connection/connection.cpp
@@ -52,7 +52,7 @@ void Connection::destroy ()
 {
   if (socket)
   {
-    socket->shutdown (SD_BOTH);
+    socket->shutdown (SHUT_RDWR);
     socket->close ();
     delete socket;
     socket = NULL;
diff --git a/myserver/src/connections_scheduler/listen_threads.cpp 
b/myserver/src/connections_scheduler/listen_threads.cpp
index 43fe9b1..0185ba6 100644
--- a/myserver/src/connections_scheduler/listen_threads.cpp
+++ b/myserver/src/connections_scheduler/listen_threads.cpp
@@ -440,7 +440,7 @@ int ListenThreads::terminate ()
           if (!serverSocket)
             continue;
 
-          serverSocket->shutdown (SD_BOTH);
+          serverSocket->shutdown (SHUT_RDWR);
           do
             {
               err = serverSocket->recv (buffer, 256, 0);
diff --git a/myserver/src/protocol/ftp/ftp.cpp 
b/myserver/src/protocol/ftp/ftp.cpp
index 93b60be..4fb2589 100644
--- a/myserver/src/protocol/ftp/ftp.cpp
+++ b/myserver/src/protocol/ftp/ftp.cpp
@@ -163,7 +163,7 @@ int FtpuserData::closeDataConnection ()
 
   if (m_pDataConnection != NULL && m_pDataConnection->socket != NULL)
     {
-      m_pDataConnection->socket->shutdown (SD_BOTH);
+      m_pDataConnection->socket->shutdown (SHUT_RDWR);
       m_pDataConnection->socket->close ();
       delete m_pDataConnection->socket;
       m_pDataConnection->socket = NULL;
@@ -546,7 +546,7 @@ void Ftp::pasv ()
       if (asock->getHandle () < 0)
         return;
 
-      pFtpuserData->m_pDataConnection->socket->shutdown (SD_BOTH);
+      pFtpuserData->m_pDataConnection->socket->shutdown (SHUT_RDWR);
       pFtpuserData->m_pDataConnection->socket->close ();
       delete pFtpuserData->m_pDataConnection->socket;
       pFtpuserData->m_pDataConnection->socket = asock;



commit 9968a9eb67a41d011ff553b2afa009a99a5a36c7
Author: Giuseppe Scrivano <address@hidden>
Date:   Wed Feb 10 17:50:49 2010 +0100

    Fix more compiler warnings

diff --git a/myserver/tests/test_socket.cpp b/myserver/tests/test_socket.cpp
index cd15885..fd5266f 100644
--- a/myserver/tests/test_socket.cpp
+++ b/myserver/tests/test_socket.cpp
@@ -80,7 +80,6 @@ public:
   {
     ThreadID tid;
     int optvalReuseAddr = 1;
-    char host[] = "localhost";
     int port = 6543;
     MYSERVER_SOCKADDRIN sockIn = { 0 };
     int status;
@@ -164,11 +163,8 @@ CPPUNIT_TEST_SUITE_REGISTRATION (TestSocket);
 static DEFINE_THREAD (testRecvClient, pParam)
 {
   Socket *obj2 = new Socket;
-
-  int optvalReuseAddr = 1;
   char host[] = "localhost";
   int port = *((int*)pParam);
-  int status;
 
   CPPUNIT_ASSERT (obj2->socket (AF_INET, SOCK_STREAM, 0) != -1);
 
@@ -184,10 +180,11 @@ static DEFINE_THREAD (testRecvClient, pParam)
   /* To sync.  */
   CPPUNIT_ASSERT (obj2->recv (buf, bufLen, 0, MYSERVER_SEC (5)) != -1);
 
-  CPPUNIT_ASSERT (obj2->shutdown (SD_BOTH) != -1);
+  CPPUNIT_ASSERT (obj2->shutdown (SHUT_RDWR) != -1);
 
   CPPUNIT_ASSERT (obj2->close () != -1);
 
   delete obj2;
   obj2 = NULL;
+  return 0;
 }
diff --git a/myserver/tests/test_socket_pair.cpp 
b/myserver/tests/test_socket_pair.cpp
index 90e0141..0c2b740 100644
--- a/myserver/tests/test_socket_pair.cpp
+++ b/myserver/tests/test_socket_pair.cpp
@@ -75,7 +75,7 @@ public:
     string fname;
     u_long nbw;
 
-    for (int i = 0; i < bsize; i++)
+    for (u_long i = 0; i < bsize; i++)
       {
         inputBuffer[i] = '\0';
         outputBuffer[i] = i + 1;
@@ -95,7 +95,7 @@ public:
     inverted.read (inputBuffer, bsize, &nbr);
     CPPUNIT_ASSERT_EQUAL (nbr, bsize);
 
-    for (int i = 0; i < bsize; i++)
+    for (u_long i = 0; i < bsize; i++)
       CPPUNIT_ASSERT_EQUAL (inputBuffer[i], outputBuffer[i]);
 
     file.close ();
diff --git a/myserver/tests/test_ssl_socket.cpp 
b/myserver/tests/test_ssl_socket.cpp
index 700e39c..85e15c3 100644
--- a/myserver/tests/test_ssl_socket.cpp
+++ b/myserver/tests/test_ssl_socket.cpp
@@ -128,7 +128,6 @@ public:
     ThreadID tid;
 
     int optvalReuseAddr = 1;
-    char host[] = "localhost";
     int port = 6543;
     MYSERVER_SOCKADDRIN sockIn = { 0 };
     int status;
@@ -211,10 +210,7 @@ CPPUNIT_TEST_SUITE_REGISTRATION (TestSslSocket);
 static DEFINE_THREAD (testSslRecvClient, pParam)
 {
   SslSocket *sslClient = NULL;
-  int optvalReuseAddr = 1;
-  char host[] = "localhost";
   int port = *((int*)pParam);
-  int cstatus = 0;
   MYSERVER_SOCKADDRIN sockIn = { 0 };
 
   ((sockaddr_in*) (&sockIn))->sin_family = AF_INET;
diff --git a/myserver/tests/test_unix_socket.cpp 
b/myserver/tests/test_unix_socket.cpp
index 7bdfe98..0ce109a 100644
--- a/myserver/tests/test_unix_socket.cpp
+++ b/myserver/tests/test_unix_socket.cpp
@@ -119,15 +119,13 @@ public:
     UnixSocketServerType data;
     data.socket = sock;
     data.result = false;
-
-    int ret;
     string path;
     FilesUtility::temporaryFileName (0, path);
     sock->socket ();
     sock->bind (path.c_str ());
     CPPUNIT_ASSERT_EQUAL (sock->listen (1), 0);
 
-    int res = Thread::create (&tid, test_unix_socket_server, &data);
+    Thread::create (&tid, test_unix_socket_server, &data);
 
     UnixSocket client;
     client.socket ();

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/connection/connection.cpp             |    2 +-
 .../src/connections_scheduler/listen_threads.cpp   |    2 +-
 myserver/src/protocol/ftp/ftp.cpp                  |    4 ++--
 myserver/tests/test_socket.cpp                     |    7 ++-----
 myserver/tests/test_socket_pair.cpp                |    4 ++--
 myserver/tests/test_ssl_socket.cpp                 |    4 ----
 myserver/tests/test_unix_socket.cpp                |    4 +---
 7 files changed, 9 insertions(+), 18 deletions(-)


hooks/post-receive
-- 
GNU MyServer




reply via email to

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