myserver-commit
[Top][All Lists]
Advanced

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

[myserver-commit] [3048] bug fixes:ftp directory handling and files righ


From: Alexandru IANCU
Subject: [myserver-commit] [3048] bug fixes:ftp directory handling and files rights, cleaned code: removed some warnings
Date: Sat, 04 Apr 2009 10:13:09 +0000

Revision: 3048
          http://svn.sv.gnu.org/viewvc/?view=rev&root=myserver&revision=3048
Author:   andu
Date:     2009-04-04 10:13:09 +0000 (Sat, 04 Apr 2009)
Log Message:
-----------
bug fixes:ftp directory handling and files rights, cleaned code: removed some 
warnings

Modified Paths:
--------------
    trunk/myserver/src/base/process/process.cpp
    trunk/myserver/src/conf/security/xml_validator.cpp
    trunk/myserver/src/plugin/plugin_info.cpp
    trunk/myserver/src/plugin/plugins_manager.cpp
    trunk/myserver/src/protocol/control/control_protocol.cpp
    trunk/myserver/src/protocol/ftp/ftp.cpp
    trunk/myserver/src/protocol/http/http.cpp
    trunk/myserver/tests/test_log_manager.cpp
    trunk/myserver/tests/test_pipe.cpp

Modified: trunk/myserver/src/base/process/process.cpp
===================================================================
--- trunk/myserver/src/base/process/process.cpp 2009-04-03 08:26:24 UTC (rev 
3047)
+++ trunk/myserver/src/base/process/process.cpp 2009-04-04 10:13:09 UTC (rev 
3048)
@@ -153,7 +153,6 @@
  */
 int Process::exec(StartProcInfo* spi, bool waitEnd)
 {
-  int ret = 0;
   pid = 0;
 #ifdef WIN32
   STARTUPINFO si;

Modified: trunk/myserver/src/conf/security/xml_validator.cpp
===================================================================
--- trunk/myserver/src/conf/security/xml_validator.cpp  2009-04-03 08:26:24 UTC 
(rev 3047)
+++ trunk/myserver/src/conf/security/xml_validator.cpp  2009-04-04 10:13:09 UTC 
(rev 3048)
@@ -70,7 +70,7 @@
 
   secName = st->getHashedData ("SECURITY_FILE_NAME", MYSERVER_VHOST_CONF | 
MYSERVER_SERVER_CONF, ".security.xml");
 
-  return cache->getParser (*(st->getResource ()), *(st->getSysDirectory ()), 
false, secName);
+  return cache->getParser (*(st->getDirectory ()), *(st->getSysDirectory ()), 
false, secName);
 }
 
 /*!

Modified: trunk/myserver/src/plugin/plugin_info.cpp
===================================================================
--- trunk/myserver/src/plugin/plugin_info.cpp   2009-04-03 08:26:24 UTC (rev 
3047)
+++ trunk/myserver/src/plugin/plugin_info.cpp   2009-04-04 10:13:09 UTC (rev 
3048)
@@ -119,6 +119,7 @@
 int PluginInfo::setMyServerMinVersion(int v)
 {
   this->msMinVersion = v;
+  return this->msMinVersion;
 }
        
 /*!
@@ -127,6 +128,7 @@
 int PluginInfo::setMyServerMaxVersion(int v)
 {
   this->msMaxVersion = v;
+  return this->msMaxVersion;
 }
 
 /*!
@@ -185,6 +187,7 @@
   if(this->plugin)
        delete this->plugin;
   this->plugin = NULL;
+  return NULL;
 }
 
 /*!

Modified: trunk/myserver/src/plugin/plugins_manager.cpp
===================================================================
--- trunk/myserver/src/plugin/plugins_manager.cpp       2009-04-03 08:26:24 UTC 
(rev 3047)
+++ trunk/myserver/src/plugin/plugins_manager.cpp       2009-04-04 10:13:09 UTC 
(rev 3048)
@@ -416,7 +416,6 @@
     
     
        HashMap<string, pair<int,int>* >::Iterator depIt = pinfo->begin();
-       bool goodVersions = true;
 
        string msversion(MYSERVER_VERSION);
        int i = msversion.find("-",0);

Modified: trunk/myserver/src/protocol/control/control_protocol.cpp
===================================================================
--- trunk/myserver/src/protocol/control/control_protocol.cpp    2009-04-03 
08:26:24 UTC (rev 3047)
+++ trunk/myserver/src/protocol/control/control_protocol.cpp    2009-04-04 
10:13:09 UTC (rev 3048)
@@ -583,7 +583,6 @@
 {
   string time;
   ostringstream out;
-  ThreadID id = Thread::threadID();
   /*
    *Check that the verbosity is at least 1.
    */
@@ -607,7 +606,6 @@
                               int bs1, ControlHeader& header)
 {
   string time;
-  ThreadID id = Thread::threadID();
   getRFC822GMTTime(time, 32);
 
 #ifdef HAVE_SNPRINTF

Modified: trunk/myserver/src/protocol/ftp/ftp.cpp
===================================================================
--- trunk/myserver/src/protocol/ftp/ftp.cpp     2009-04-03 08:26:24 UTC (rev 
3047)
+++ trunk/myserver/src/protocol/ftp/ftp.cpp     2009-04-04 10:13:09 UTC (rev 
3048)
@@ -579,7 +579,7 @@
   int asockInLen = 0;
   Socket asock;
   if ( pFtpUserData->m_pDataConnection->socket->dataOnRead(timeoutvalue, 0) == 
1 )
-  {
+    {
     asockInLen = sizeof(sockaddr_in);
     asock = pFtpUserData->m_pDataConnection->socket->accept(&asockIn, 
&asockInLen);
     if ( asock.getHandle() == (FileHandle)INVALID_SOCKET )
@@ -1497,7 +1497,7 @@
   }
   ///////////////////////////////////////
   if ( FilesUtility::isDirectory(sOutPath) && 
-       (sOutPath[sOutPath.length() - 1] != '/' || sOutPath[sOutPath.length() - 
1] != '\\') )
+       (sOutPath[sOutPath.length() - 1] != '/' && sOutPath[sOutPath.length() - 
1] != '\\') )
     sOutPath.append("/");
   return true;
 }
@@ -2399,8 +2399,11 @@
 {
   if ( sPath.empty() )
     return 0;
-  std::string sDir, sFileName;
-  FilesUtility::splitPath(sPath, sDir, sFileName);
+  std::string sDir(""), sFileName("");
+  if ( !FilesUtility::isDirectory(sPath.c_str()) )
+    FilesUtility::splitPath(sPath, sDir, sFileName);
+  else
+    sDir = sPath;
 
   SecurityToken st;
   string user;

Modified: trunk/myserver/src/protocol/http/http.cpp
===================================================================
--- trunk/myserver/src/protocol/http/http.cpp   2009-04-03 08:26:24 UTC (rev 
3047)
+++ trunk/myserver/src/protocol/http/http.cpp   2009-04-04 10:13:09 UTC (rev 
3048)
@@ -798,7 +798,6 @@
    */
   string filename;
   const char *cgiManager;
-  int mimecmd;
   int ret;
   string directory;
   string file;

Modified: trunk/myserver/tests/test_log_manager.cpp
===================================================================
--- trunk/myserver/tests/test_log_manager.cpp   2009-04-03 08:26:24 UTC (rev 
3047)
+++ trunk/myserver/tests/test_log_manager.cpp   2009-04-04 10:13:09 UTC (rev 
3048)
@@ -541,7 +541,6 @@
   void testGetLogStreamSharedByTheSameObject ()
   {
     list<string> filters;
-    AnObject anObject;
     list<void*> l;
     LogStream* ls;
     LogStream* ls1;

Modified: trunk/myserver/tests/test_pipe.cpp
===================================================================
--- trunk/myserver/tests/test_pipe.cpp  2009-04-03 08:26:24 UTC (rev 3047)
+++ trunk/myserver/tests/test_pipe.cpp  2009-04-04 10:13:09 UTC (rev 3048)
@@ -91,9 +91,7 @@
   void testWaitForData()
   {
     char outBuff[256];
-    char inBuff[256];
     u_long nbw;
-    u_long nbr;
 
     strcpy(outBuff, "MyServer is a powerful and easy to configure web server");
 





reply via email to

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