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. v0.9.2-467


From: Giuseppe Scrivano
Subject: [myserver-commit] [SCM] GNU MyServer branch, master, updated. v0.9.2-467-g3c79d69
Date: Thu, 21 Apr 2011 17:18:05 +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  3c79d69d6099d3b03026dd2ca8be30e8c67a24e3 (commit)
      from  8dd135c0c0c053733cd70dc04c5db204dc9708ad (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 3c79d69d6099d3b03026dd2ca8be30e8c67a24e3
Author: Giuseppe Scrivano <address@hidden>
Date:   Thu Apr 21 19:18:04 2011 +0200

    Fix some tests failures.

diff --git a/myserver/include/filter/filters_factory.h 
b/myserver/include/filter/filters_factory.h
index 6567d54..1878fdd 100644
--- a/myserver/include/filter/filters_factory.h
+++ b/myserver/include/filter/filters_factory.h
@@ -46,10 +46,11 @@ public:
   int insert (const char*, FILTERCREATE ptr);
   int insert (const char*, FiltersSource* ptr);
   Filter *getFilter (const char*);
-  FiltersChain* chain (list<string> &l, Stream* out, size_t *nbw,
-                       int onlyNotModifiers = 0);
+  FiltersChain* makeChain (list<string> &l, Stream* out, size_t *nbw,
+                           int onlyNotModifiers = 0);
   int chain (FiltersChain*, list<string> &l, Stream* out, size_t *nbw,
-             int onlyNotModifiers = 0, string *accepted = NULL);
+             bool onlyNotModifiers = false, bool acceptAll = true,
+             const string &accepted = "");
 
   FiltersFactory ();
   ~FiltersFactory ();
diff --git a/myserver/src/filter/filters_factory.cpp 
b/myserver/src/filter/filters_factory.cpp
index 999ef45..e3a9112 100644
--- a/myserver/src/filter/filters_factory.cpp
+++ b/myserver/src/filter/filters_factory.cpp
@@ -94,8 +94,8 @@ Filter *FiltersFactory::getFilter (const char* name)
   will not modify the data.
   On errors returns 0.
 */
-FiltersChain* FiltersFactory::chain (list<string> &l, Stream* out, size_t *nbw,
-                                     int onlyNotModifiers)
+FiltersChain* FiltersFactory::makeChain (list<string> &l, Stream* out, size_t 
*nbw,
+                                         int onlyNotModifiers)
 {
   FiltersChain *ret = new FiltersChain ();
   if (!ret)
@@ -118,11 +118,13 @@ FiltersChain* FiltersFactory::chain (list<string> &l, 
Stream* out, size_t *nbw,
   \param nbw Number of written bytes, some filters may need to send a header.
   \param onlyNotModifiers if non-zero the method wil check that all the filters
   will not modify the data.
+  \param acceptAll If true, accept only modifier filters specified in 
`accepted'.
   \param accepted If specified, include only filters present in this string.
   On errors returns nonzero.
 */
 int FiltersFactory::chain (FiltersChain* c, list<string> &l, Stream* out,
-                           size_t *nbw, int onlyNotModifiers, string *accepted)
+                           size_t *nbw, bool onlyNotModifiers, bool acceptAll,
+                           const string &accepted)
 {
 
   list<string>::iterator  i = l.begin ();
@@ -144,7 +146,7 @@ int FiltersFactory::chain (FiltersChain* c, list<string> 
&l, Stream* out,
 
       if (n->modifyData ())
         {
-          if ((! accepted) || accepted->find (*i) == string::npos)
+          if (!acceptAll && accepted.find (*i) == string::npos)
             continue;
 
           if (onlyNotModifiers)
diff --git a/myserver/src/http_handler/http_file/http_file.cpp 
b/myserver/src/http_handler/http_file/http_file.cpp
index 2c390c2..494d20c 100644
--- a/myserver/src/http_handler/http_file/http_file.cpp
+++ b/myserver/src/http_handler/http_file/http_file.cpp
@@ -326,8 +326,8 @@ int HttpFile::send (HttpThreadContext* td, const char 
*filenamePath,
           Server::getInstance ()->getFiltersFactory ()->chain (&chain,
                                                                
td->mime->filters,
                                                                &memStream,
-                                                               &nbw, 0,
-                                                               e ? &e->value : 
NULL);
+                                                               &nbw, 0, false,
+                                                               e ? e->value : 
"");
       }
 
     useModifiers = chain.hasModifiersFilters ();
diff --git a/myserver/src/log/stream/console_stream_creator.cpp 
b/myserver/src/log/stream/console_stream_creator.cpp
index 6d3d484..c99a6b7 100644
--- a/myserver/src/log/stream/console_stream_creator.cpp
+++ b/myserver/src/log/stream/console_stream_creator.cpp
@@ -27,7 +27,7 @@ ConsoleStreamCreator::create (FiltersFactory* ff, string 
location,
   if (out && !out->openConsole (location))
     {
       size_t nbw;
-      FiltersChain* fc = ff->chain (filters, out, &nbw);
+      FiltersChain* fc = ff->makeChain (filters, out, &nbw);
       if (fc)
         {
           return new ConsoleStream (ff, cycle, out, fc);
diff --git a/myserver/src/log/stream/file_stream_creator.cpp 
b/myserver/src/log/stream/file_stream_creator.cpp
index 70609cd..6242e09 100644
--- a/myserver/src/log/stream/file_stream_creator.cpp
+++ b/myserver/src/log/stream/file_stream_creator.cpp
@@ -30,7 +30,7 @@ FileStreamCreator::create (FiltersFactory* ff, string 
location,
       size_t nbw;
       out->openFile (location.c_str (),
                      FileStream::defaultFileMask);
-      fc = ff->chain (filters, out, &nbw);
+      fc = ff->makeChain (filters, out, &nbw);
       if (fc)
         return new FileStream (ff, cycle, out, fc);
     }
diff --git a/myserver/src/log/stream/socket_stream_creator.cpp 
b/myserver/src/log/stream/socket_stream_creator.cpp
index 573a91a..a29d885 100644
--- a/myserver/src/log/stream/socket_stream_creator.cpp
+++ b/myserver/src/log/stream/socket_stream_creator.cpp
@@ -33,7 +33,7 @@ SocketStreamCreator::create (FiltersFactory* ff, string 
location,
   if (out && !out->connect (host.c_str (), port))
     {
       size_t nbw;
-      FiltersChain* fc = ff->chain (filters, out, &nbw);
+      FiltersChain* fc = ff->makeChain (filters, out, &nbw);
       if (fc)
         return new SocketStream (ff, cycle, out, fc);
     }

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

Summary of changes:
 myserver/include/filter/filters_factory.h          |    7 ++++---
 myserver/src/filter/filters_factory.cpp            |   10 ++++++----
 myserver/src/http_handler/http_file/http_file.cpp  |    4 ++--
 myserver/src/log/stream/console_stream_creator.cpp |    2 +-
 myserver/src/log/stream/file_stream_creator.cpp    |    2 +-
 myserver/src/log/stream/socket_stream_creator.cpp  |    2 +-
 6 files changed, 15 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
GNU MyServer



reply via email to

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