[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[myserver-commit] [SCM] GNU MyServer branch, master, updated. 53919930c2
From: |
Giuseppe Scrivano |
Subject: |
[myserver-commit] [SCM] GNU MyServer branch, master, updated. 53919930c2c1cd0766acd07b120dc2ee51bfc2da |
Date: |
Sun, 11 Oct 2009 19:46:55 +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 53919930c2c1cd0766acd07b120dc2ee51bfc2da (commit)
via 48a1b9d5fcd3e43bad06dfecad22c8392d545d61 (commit)
via 092cbd13fc8dd4240cd0ba660613450c284bc170 (commit)
from 9e8c9870f57de0a2d56861f12de6aef5b561ed45 (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 53919930c2c1cd0766acd07b120dc2ee51bfc2da
Author: Giuseppe Scrivano <address@hidden>
Date: Sun Oct 11 21:30:23 2009 +0200
Raise an error if the same location is registered multiple times.
diff --git a/myserver/src/conf/vhost/xml_vhost_handler.cpp
b/myserver/src/conf/vhost/xml_vhost_handler.cpp
index 8315a57..4dfc472 100644
--- a/myserver/src/conf/vhost/xml_vhost_handler.cpp
+++ b/myserver/src/conf/vhost/xml_vhost_handler.cpp
@@ -362,9 +362,18 @@ int XmlVhostHandler::loadXMLConfigurationFile (const char
*filename)
loc.append ((const char*) attrs->children->content);
}
- MimeRecord *rc = XmlMimeHandler::readRecord (lcur);
- vh->addLocationMime (loc, rc);
- vh->getLocationsMime ()->put (loc, rc);
+ MimeRecord *record = XmlMimeHandler::readRecord (lcur);
+ MimeRecord *prev = vh->addLocationMime (loc, record);
+ if (prev)
+ {
+ Server::getInstance ()->log (MYSERVER_LOG_MSG_ERROR,
+ _("The location `%s' is registered multiple times"),
+ loc.c_str ());
+
+ delete prev;
+ }
+
+ vh->getLocationsMime ()->put (loc, record);
}
else if (!xmlStrcmp (lcur->name, (const xmlChar *)"SSL_PRIVATEKEY"))
{
commit 48a1b9d5fcd3e43bad06dfecad22c8392d545d61
Author: Giuseppe Scrivano <address@hidden>
Date: Sun Oct 11 21:29:48 2009 +0200
Fix a broken test case.
diff --git a/myserver/tests/test_mime_manager.cpp
b/myserver/tests/test_mime_manager.cpp
index 835336d..3467276 100644
--- a/myserver/tests/test_mime_manager.cpp
+++ b/myserver/tests/test_mime_manager.cpp
@@ -22,7 +22,7 @@
#include <cppunit/ui/text/TestRunner.h>
#include <cppunit/extensions/HelperMacros.h>
-#include <include/conf/mime/mime_manager.h>
+#include <include/conf/mime/xml_mime_handler.h>
#include <string.h>
@@ -30,17 +30,17 @@
using namespace std;
-class TestMimeManager : public CppUnit::TestFixture
+class TestXmlMimeHandler : public CppUnit::TestFixture
{
- CPPUNIT_TEST_SUITE ( TestMimeManager );
+ CPPUNIT_TEST_SUITE ( TestXmlMimeHandler );
CPPUNIT_TEST ( testLoadXML );
CPPUNIT_TEST_SUITE_END ();
- MimeManager *mm;
+ XmlMimeHandler *mm;
public:
void setUp ()
{
- mm = new MimeManager;
+ mm = new XmlMimeHandler;
}
void tearDown ()
@@ -99,4 +99,4 @@ private:
};
-CPPUNIT_TEST_SUITE_REGISTRATION ( TestMimeManager );
+CPPUNIT_TEST_SUITE_REGISTRATION ( TestXmlMimeHandler );
commit 092cbd13fc8dd4240cd0ba660613450c284bc170
Author: Giuseppe Scrivano <address@hidden>
Date: Sun Oct 11 21:23:45 2009 +0200
Remove trailing whitespaces.
diff --git a/plugins/SConstruct b/plugins/SConstruct
index a4eb4cf..4de4c7c 100644
--- a/plugins/SConstruct
+++ b/plugins/SConstruct
@@ -4,7 +4,7 @@
# MyServer
# http://www.gnu.org/software/myserver/
#
-# Copyright (C) 2002-2008 Free Software Foundation, Inc.
+# Copyright (C) 2002-2009 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
@@ -36,29 +36,23 @@ release_dir = "pub/"
plugin = ARGUMENTS.get('plugin', "")
command = ARGUMENTS.get('command', "build")
-
arch = ""
import os
if os.name=="nt":
arch = "win32"
else:
- import string
arch = string.lower(os.uname()[0])
if string.find(os.uname()[4],"64")==-1:
arch = arch + "32"
else:
arch = arch + "64"
-
if plugin=="":
print_help()
Exit(1)
plugins = plugin.split(",");
-
-
msheaders = ARGUMENTS.get('msheaders', os.path.normpath (os.getcwd () +
"/../myserver"))
-
listinc=[
'/usr/local/include',
'/usr/include',
@@ -67,8 +61,6 @@ listinc=[
msheaders,
'.'
]
-
-
def tar_package(src_dir, name, filename):
import tarfile
@@ -80,7 +72,7 @@ def build_plugin(name):
dest_dir = bin_dir + name
SConscript([src_dir + name + "/SConscript"],['dest_dir','listinc'])
Command(dest_dir + "/plugin.xml",src_dir + name + "/plugin.xml",
Copy("$TARGET", "$SOURCE"))
-
+
def build_plugins(plugins):
for name in plugins:
build_plugin(name)
@@ -91,8 +83,8 @@ def pack_plugin(name):
filename = name + "-" + version[0].firstChild.data + "-" + arch + ".tar.gz"
if not os.path.exists(release_dir):
os.makedirs(release_dir)
- tar_package(bin_dir + name, name, release_dir + filename)
-
+ tar_package(bin_dir + name, name, release_dir + filename)
+
def pack_source(name):
doc = xml.dom.minidom.parse(src_dir + name + "/plugin.xml")
version = doc.getElementsByTagName("VERSION")
@@ -106,16 +98,14 @@ def pack_source(name):
shutil.copy("SConstruct",temp)
tar_package(temp, name, release_dir + filename)
shutil.rmtree(temp)
-
def pack_plugins(plugins):
for name in plugins:
pack_plugin(name)
-
+
def pack_sources(plugins):
for name in plugins:
- pack_source(name)
-
+ pack_source(name)
env = Environment(CPPPATH=listinc,CXXFLAGS="-fPIC -DPIC -DHAVE_CONFIG_H",
LINKFLAGS="-rdynamic")
@@ -127,7 +117,6 @@ if not conf.CheckCXXHeader("include/server/server.h"):
print "unable to find myserver headers"
Exit(1)
-
env = conf.Finish()
if command=='build':
@@ -137,9 +126,6 @@ elif command=='package':
elif command=='source':
pack_sources(plugins)
-
-
-
#TODO: test compile and run.
#if command == "build":
# testsFiles = glob.glob('tests/*.cpp') + files
-----------------------------------------------------------------------
Summary of changes:
myserver/src/conf/vhost/xml_vhost_handler.cpp | 15 +++++++++++--
myserver/tests/test_mime_manager.cpp | 12 +++++-----
plugins/SConstruct | 26 +++++-------------------
3 files changed, 24 insertions(+), 29 deletions(-)
hooks/post-receive
--
GNU MyServer
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [myserver-commit] [SCM] GNU MyServer branch, master, updated. 53919930c2c1cd0766acd07b120dc2ee51bfc2da,
Giuseppe Scrivano <=