* server/CommClientFactory.cpp, server/CommClientFactory.h: Add a
new factory for http client objects.
* server/CommStreamListener.cpp, server/CommStreamListener.h:
Move the client factory behavior into this base class
as all listners will now be using it.
* server/CommTCPListener.cpp, server/CommTCPListener.h,
server/CommUnixListener.cpp, server/CommUnixListener.h:
Require a client factory reference and pass to the base class
which uses it.
* server/Makefile.am: Remove obsolete special purpose listeners.
* server/server.cpp: Use straight TCP listeners for everything
as no special purpose listener functionality is required any more.
* server/CommPeer.h, server/CommPeer.cpp: Re-factor CommPeer to
only be used for initiating peer connections.
* server/Admin.cpp: Use the modified CommPeer constructor.
* server/CommClient.h, server/CommClient.cpp: Make the connection
a pointer rather than a reference, and pass it in during setup.
* server/CommClientFactory.h, server/CommClientFactory.cpp: Re-factor
the commclient factory to take connection type as a template param,
and create the client and connection objects separately.
* server/server.cpp: Use the modified CommClientFactory parameter.
* server/Makefile.am: Remove the different kinds of client class
from the build.
* server/CommLocalClient.cpp, server/CommLocalClient.h: Fix the
constructor interface to match that used by the factory.
* server/CommClientFactory.cpp: Add support for CommLocalClient.
* server/CommUnixListener.cpp, server/CommUnixListener.h:
Convert the unix listener to use the CommClientFactory to remove
duplicated code.
* server/server.cpp: Use the new style of listener API on the unix
socket.
* server/CommListener.cpp, server/CommListener.h: Refactor from
a template to a regular class that uses the factories.
* server/server.cpp: Fix usage of CommListener.
* server/CommListener.h, server/CommListener.cpp: Make the
Atlas listener a template for handling the various types
of socket to use.
* server/server.cpp: Use the CommListener template correctly.
* server/CommPeerListener.cpp, server/CommPeerListener.h,
server/Makefile.am: Remove the obsolete explicit peer listener
from the build.
* common/system.cpp, common/system.h: Add security_init(), a
function to initialise any security or crypto related libraries
used. This is required by recent version of libgcrypt when
using hash functions.
* server/server.cpp, tests/systemtest.cpp, tools/cypasswd.cpp:
Call security_init() in all programs that use security related
functions.
* configure.ac: Add a check for res_init().
* server/CommMetaClient.cpp, server/CommMetaClient.h: Refactor
the metaserver related code so it retries resolving the address
of the metaserver, and then uses the address established later
than init time. This provisionally fixes bug #283763 which was
that cyphesis would never talk to the metaserver if the name
resolution at startup failed.
* server/server.cpp: Modify the way MetaClient is set up as it
is now not an open socket after initial setup.
* server/CommHttpListener.cpp, server/CommHttpListener.h: New
class to listen for http connections.
* server/CommHttpClient.cpp, server/CommHttpClient.h: New class to
handle http requests.
* server/server.cpp: Hack in a http listen socket on 6780.
* server/IdleConnector.cpp, server/IdleConnector.h: A generic sigc++
based class for functions which need to be called regularly.
* server/StorageManager.cpp, server/StorageManager.h: Add a method
to be called once a second from the idler.
* server/server.cpp: Hook the idler up to storage manager.
* server/EntityFactory.cpp, server/EntityFactory.h, server/Admin.cpp,
server/PersistantThingFactory.cpp, server/WorldRouter.cpp,
server/server.cpp: Rename EntityFactory to EntityBuilder, to make
it's function clearer.
* common/system.h: Add a new exit status code indicating that no
ports were available in the dynamic range.
* server/server.cpp, common/system.cpp: When there are no ports
available, write an appropriate message, and a hint describing
how to allocate more.
* server/Persistance.cpp: Add an information message when attempting
to create a new instance database.
* server/server.cpp: Store a new value for the start of the dynamic
port range, if one is allocated.
* common/globals.cpp: Force the instance name into lower case
alphanumeric, and underscore only. Reject it if it can't easily
be forced.
* common/Database.cpp, common/Database.h: Add a new API for
attempting to bootstrap an instance database from the master.
* server/Persistance.h, server/Persistance.cpp: Make some of the
functions in the persistence API non-static, so they work
more cleanly and consistently. Use the new return codes
specified in the config header. If an instance can't get a database
connection, use the master database to try and create one.
* server/server.cpp: Use the persistence code the way it is
intended to be used.
* common/globals.h, common/globals.cpp: Provide a separate function
for saving user settings back to the home directory. When
configuring a new instance, store the ruleset in user settings,
and log an informational message rather than a warning.
* server/server.cpp: When dynamically assigning a port to a new
instance, store the port in user settings, and log an informational
message. Save the user configuration once the validity has been
completely verified and applied.
* common/globals.cpp, common/globals.h: Add a new config setting for
the instance short name, and support per-instance configuration.
Add config settings for a dynamic port range.
* server/server.cpp: Support per-instance configuration and use a
dynamic port for non-default instances.
* common/globals.cpp, common/globals.h: Modify the loadConfig
function so it takes usage hints, and checks the options in known
sections against those in the usage help.
* client/client.cpp, server/server.cpp, tools/cyaddrules.cpp,
tools/cycmd.cpp, tools/cydumprules.cpp, tools/cyloadrules.cpp,
tools/cypasswd.cpp: Convert all calls to loadConfig to provide
the right hints.
* common/globals.cpp: Make a missing config file no longer fatal,
as the default are now sane, and do work.
* server/server.cpp: Fix up some error and status messages.
* common/log.cpp, common/log.h: Switch to taking a C++ string reference
rather than a char *, as it is not really an optimisation, and it
makes the code simpler to read and write.
* client/BaseClient.cpp, client/ClientConnection.cpp,
common/AtlasFileLoader.cpp, common/BaseEntity.cpp,
common/Database.cpp, common/globals.cpp, common/id.cpp,
common/inheritance.cpp, common/log.cpp, common/log.h,
rulesets/Character.cpp, rulesets/Creator.cpp, rulesets/Entity.cpp,
rulesets/MemMap.cpp, rulesets/Motion.cpp, rulesets/Pedestrian.cpp,
rulesets/Py_Object.cpp, rulesets/Py_RootEntity.cpp,
rulesets/PythonMindScript.cpp, rulesets/PythonThingScript.cpp,
rulesets/Python_API.cpp, rulesets/Thing.cpp, server/Account.cpp,
server/Admin.cpp, server/ArithmeticFactory.cpp,
server/CommClient.cpp, server/CommListener.cpp,
server/CommMDNSPublisher.cpp, server/CommServer.cpp,
server/Connection.cpp, server/EntityFactory.cpp,
server/Persistance.cpp, server/Restoration.cpp,
server/ScriptFactory.cpp, server/TaskFactory.cpp,
server/WorldRouter.cpp, server/server.cpp: Convert over to using
new API correctly.
* data/mason.xml: Add biomass and transient to fircone, making its
script obsolete:
* scripts/cyphesis-setup.sh: Complete the database setup script
functionality. Clean up the output, and polish.
* server/PersistantThingFactory.cpp, server/PersistantThingFactory.h,
server/PersistantThingFactory_impl.h: Partially specialise the non
persistent entity factory so we can register the persistor database
tables for the world object when persistence is disabled, so the
state of this entity can be restored.
* server/server.cpp: Tidy up the startup output.
* server/EntityFactory.cpp: Don't try and set up world persistence if
it is turned off.
* common/globals.cpp, common/globals.h: Change the type and name
of the ruleset list to a string.
* rulesets/Python_API.cpp, server/EntityFactory.cpp,
server/server.cpp, tools/cyaddrules.cpp, tools/cydumprules.cpp,
tools/cyloadrules.cpp: Switch to using single ruleset config
variable.
* common/globals.cpp, common/globals.h: Add interfact and mechanism
for showing usage data for all the programs given one central
location for the data.
* server/server.cpp: Test out the usage function.
* tools/cypasswd.cpp: Display usage using the old mechanism.
* commong/globals.h, common/globals.cpp: Add definitions for different
error codes from reading the config file, in particular codes that
indicate that the user has requested version, help or usage
information. Add a function for reporting the version of tools.
* server/server.cpp: Add support for version or usage arguments,
including specific reporting of the server build number, which is
does not apply when reporting the version of other components.
* tools/Makefile.am: Fix the globals modules dependency on consts.
* tools/cypasswd.cpp: Add support for version or usage arguments.
* common/Database.cpp: Improve the presentation of Database error
messages.
* server/server.cpp: If connecting to the database fails, just
disable it, and report plenty of error information.