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. 0ba7d30d08


From: Giuseppe Scrivano
Subject: [myserver-commit] [SCM] GNU MyServer branch, master, updated. 0ba7d30d08f068588c079035a8e1794ec5a77317
Date: Tue, 03 Nov 2009 14:06:53 +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  0ba7d30d08f068588c079035a8e1794ec5a77317 (commit)
       via  0057f78085390012f7fd5153babfd3bc7cc8eb79 (commit)
      from  5d3669daa38db26da58efca14c62e308df8f5bdc (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 0ba7d30d08f068588c079035a8e1794ec5a77317
Author: Giuseppe Scrivano <address@hidden>
Date:   Tue Nov 3 15:06:27 2009 +0100

    Revert a change in MemBuf introduced recently and remove some casts.

diff --git a/myserver/src/base/mem_buff/mem_buff.cpp 
b/myserver/src/base/mem_buff/mem_buff.cpp
index ef95324..e6367dc 100644
--- a/myserver/src/base/mem_buff/mem_buff.cpp
+++ b/myserver/src/base/mem_buff/mem_buff.cpp
@@ -233,11 +233,6 @@ void MemBuf::addBuffer (const void* pAdr, u_int size)
     {
       memcpy (buffer + nSize, pAdr, size);
       nSize = nNewSize;
-
-      /* There is room to append '\0', it is not considered
-       * as part of the buffer.  */
-      if (size < nAllowedSize)
-        buffer[nSize + size] = '\0';
     }
   return;
 }
@@ -615,7 +610,7 @@ MemBuf MemBuf::operator+ (MemBuf& src)
 MemBuf MemBuf::operator+ (const char* src)
 {
   MemBuf temp (*this);
-  temp.addBuffer ((const void*) src, (u_int)strlen (src));
+  temp.addBuffer ((const void*) src, strlen (src));
   return temp;
 }
 const MemBuf& MemBuf::operator+= (MemBuf& add)
@@ -625,7 +620,7 @@ const MemBuf& MemBuf::operator+= (MemBuf& add)
 }
 const MemBuf& MemBuf::operator+= (const char* pStr)
 {
-  addBuffer (pStr, (u_int)strlen (pStr));
+  addBuffer (pStr, strlen (pStr));
   return *this;
 }
 const MemBuf& MemBuf::operator+= (char c)
@@ -635,7 +630,7 @@ const MemBuf& MemBuf::operator+= (char c)
 }
 MemBuf& MemBuf::operator<< (const char* pSrc)
 {
-  addBuffer (pSrc, (u_int)strlen (pSrc));
+  addBuffer (pSrc, strlen (pSrc));
   return *this;
 }
 MemBuf& MemBuf::operator<< (int i)
@@ -685,7 +680,7 @@ MemBuf& MemBuf::operator=(const MemBuf& src)
 }
 MemBuf& MemBuf::operator=(const char* src)
 {
-  setBuffer ((const void*) src, (u_int)strlen (src) + 1);
+  setBuffer ((const void*) src, strlen (src) + 1);
   return* this;
 }
 



commit 0057f78085390012f7fd5153babfd3bc7cc8eb79
Author: Giuseppe Scrivano <address@hidden>
Date:   Tue Nov 3 15:05:45 2009 +0100

    Fix indentation.

diff --git a/myserver/include/protocol/ftp/ftp.h 
b/myserver/include/protocol/ftp/ftp.h
index 73c94fc..fcc1b26 100644
--- a/myserver/include/protocol/ftp/ftp.h
+++ b/myserver/include/protocol/ftp/ftp.h
@@ -42,46 +42,46 @@ public:
   virtual bool allowdelete (bool);
 
   enum Ftpstate
-  {
-    NO_CONTROL_CONNECTION,
-    BUISY,
-    UNAVAILABLE,
-    CONTROL_CONNECTION_UP,
-    USER_LOGGED_IN,
-    DATA_CONNECTION_UP
-  } m_nFtpstate;
-
-    std::string m_suserName, m_sPass;
+    {
+      NO_CONTROL_CONNECTION,
+      BUISY,
+      UNAVAILABLE,
+      CONTROL_CONNECTION_UP,
+      USER_LOGGED_IN,
+      DATA_CONNECTION_UP
+    } m_nFtpstate;
+
+  std::string m_suserName, m_sPass;
   enum FtpRepresentation
-  {
-    REPR_ASCII,
-    REPR_IMAGE
-  } m_nFtpRepresentation;
+    {
+      REPR_ASCII,
+      REPR_IMAGE
+    } m_nFtpRepresentation;
   enum FtpFormatControl
-  {
-    NON_PRINT
-  } m_nFtpFormatControl;
+    {
+      NON_PRINT
+    } m_nFtpFormatControl;
   enum FtpFilestructure
-  {
-    STRU_FILE
-  } m_nFtpFilestructure;
+    {
+      STRU_FILE
+    } m_nFtpFilestructure;
   enum FtpTransfermode
-  {
-    MODE_STREAM
-  } m_nTransfermode;
+    {
+      MODE_STREAM
+    } m_nTransfermode;
   ConnectionPtr m_pDataConnection;
   Mutex m_DataConnBusy;
   FtpHost m_cdh;
-    std::string m_cwd;
+  std::string m_cwd;
   int m_nLocalDataport;
   bool m_bBreakDataConnection;
   ThreadID m_dataThreadId;
   bool m_bPassiveSrv;
   u_long m_nrestartOffset;
-    std::string m_sRenameFrom;
+  std::string m_sRenameFrom;
 
   // STAT data
-    std::string m_sCurrentFileName;
+  std::string m_sCurrentFileName;
   u_long m_nFileSize, m_nBytesSent;
 };
 
@@ -103,8 +103,8 @@ class Ftp:public Protocol
 public:
   Ftp ();
   virtual ~ Ftp ();
-       virtual int controlConnection (ConnectionPtr con, char *request, char 
*auxBuf,
-                             u_long reqBufLen, u_long auxBufLen, u_long reqLen,
+  virtual int controlConnection (ConnectionPtr con, char *request, char 
*auxBuf,
+                                 u_long reqBufLen, u_long auxBufLen, u_long 
reqLen,
                                  u_long tid);
 
   static int loadProtocolstatic ();
@@ -194,14 +194,14 @@ public:
   DataConnectionWorkerThreadData ();
   ~DataConnectionWorkerThreadData ();
   ConnectionPtr m_pConnection;
-    std::string m_sFilePath;
+  std::string m_sFilePath;
   bool m_bappend;
   Ftp *m_pFtp;
 };
 
 int getFtpReply (int nReplyCode, std::string & sReply);
 void ftpReply (ConnectionPtr pConnection, int nReplyCode,
-               const std::string & sCustomText = "");
+               const std::string & sCustomText = "");
 void yyerror (YYLTYPE * pLoc, Ftp * pContext, const char *msg);
 
 
@@ -227,7 +227,7 @@ public:
     return Ftp::registerNameImpl (out, len);
   }
 
-       virtual int controlConnection (ConnectionPtr con, char *request,
+  virtual int controlConnection (ConnectionPtr con, char *request,
                                  char *auxBuf, u_long reqBufLen,
                                  u_long auxBufLen, u_long reqLen,
                                  u_long tid)
@@ -258,4 +258,4 @@ public:
 };
 
 
-#endif // FTP_H
+#endif

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

Summary of changes:
 myserver/include/protocol/ftp/ftp.h     |   64 +++++++++++++++---------------
 myserver/src/base/mem_buff/mem_buff.cpp |   13 ++----
 2 files changed, 36 insertions(+), 41 deletions(-)


hooks/post-receive
-- 
GNU MyServer




reply via email to

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