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. 5d3669daa3


From: Giuseppe Scrivano
Subject: [myserver-commit] [SCM] GNU MyServer branch, master, updated. 5d3669daa38db26da58efca14c62e308df8f5bdc
Date: Mon, 02 Nov 2009 23:39:18 +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  5d3669daa38db26da58efca14c62e308df8f5bdc (commit)
      from  472fe8b1e3a604809b300221d89b83a6297d6808 (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 5d3669daa38db26da58efca14c62e308df8f5bdc
Author: Giuseppe Scrivano <address@hidden>
Date:   Mon Nov 2 23:41:03 2009 +0100

    Raise an error if Protocol::controlConnection is used.

diff --git a/myserver/include/protocol/ftp/ftp.h 
b/myserver/include/protocol/ftp/ftp.h
index 80576b0..73c94fc 100644
--- a/myserver/include/protocol/ftp/ftp.h
+++ b/myserver/include/protocol/ftp/ftp.h
@@ -227,11 +227,16 @@ public:
     return Ftp::registerNameImpl (out, len);
   }
 
-  virtual int controlConnection (ConnectionPtr a, char *b1, char *b2,
-                                int bs1, int bs2, u_long nbtr, u_long id)
+       virtual int controlConnection (ConnectionPtr con, char *request,
+                                 char *auxBuf, u_long reqBufLen,
+                                 u_long auxBufLen, u_long reqLen,
+                                 u_long tid)
   {
     Ftp ftp;
-    return ftp.controlConnection (a, b1, b2, bs1, bs2, nbtr, id);
+    int ret = 0;
+
+    return ftp.controlConnection (con, request, auxBuf, reqBufLen, auxBufLen,
+                                  reqLen, tid);
   }
 
   virtual int loadProtocol ()
diff --git a/myserver/include/protocol/http/http.h 
b/myserver/include/protocol/http/http.h
index 6b25d57..b320edc 100644
--- a/myserver/include/protocol/http/http.h
+++ b/myserver/include/protocol/http/http.h
@@ -222,12 +222,8 @@ public:
                                  u_long tid)
   {
     Http http;
-    int ret = 0;
-
-    ret = http.controlConnection (con, request, auxBuf, reqBufLen, auxBufLen,
-                                  reqLen, tid);
-
-    return ret;
+    return http.controlConnection (con, request, auxBuf, reqBufLen, auxBufLen,
+                                   reqLen, tid);
   }
 
        virtual int loadProtocol ()
diff --git a/myserver/src/protocol/protocol.cpp 
b/myserver/src/protocol/protocol.cpp
index d74829e..c211c4d 100644
--- a/myserver/src/protocol/protocol.cpp
+++ b/myserver/src/protocol/protocol.cpp
@@ -15,7 +15,10 @@ You should have received a copy of the GNU General Public 
License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#include "stdafx.h"
 #include <include/protocol/protocol.h>
+#include <include/server/clients_thread.h>
+#include <include/server/server.h>
 
 /*!
  * Load the protocol. Called once at runtime.
@@ -52,7 +55,9 @@ int Protocol::controlConnection (ConnectionPtr con, char 
*request,
                                  u_long auxBufLen, u_long reqLen,
                                  u_long tid)
 {
-  return 0;
+  Server::getInstance ()->log (MYSERVER_LOG_MSG_ERROR,
+                               _("Using Protocol::controlConnection"));
+  return ClientsThread::DELETE_CONNECTION;
 }
 
 /*!
diff --git a/myserver/src/server/clients_thread.cpp 
b/myserver/src/server/clients_thread.cpp
index 36d28ef..d1827fb 100644
--- a/myserver/src/server/clients_thread.cpp
+++ b/myserver/src/server/clients_thread.cpp
@@ -312,7 +312,7 @@ int ClientsThread::controlConnections ()
                                            secondaryBuffer.getRealLength (),
                                            nBytesToRead, id);
         else
-          retcode = DELETE_CONNECTION;
+          retcode = ClientsThread::DELETE_CONNECTION;
       }
   }
   catch (...)

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

Summary of changes:
 myserver/include/protocol/ftp/ftp.h    |   11 ++++++++---
 myserver/include/protocol/http/http.h  |    8 ++------
 myserver/src/protocol/protocol.cpp     |    7 ++++++-
 myserver/src/server/clients_thread.cpp |    2 +-
 4 files changed, 17 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
GNU MyServer




reply via email to

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