Since we're targetting the latest LTS release of Ubuntu as a nice
baseline, and that currently only supports 1.46, we need to remove the
nice steady_timer code. For now.
This commit should probably be reverted once a newer version of Ubuntu
LTS is available.
This required cleaning up a bunch of other things:
Expose functions to disconnect and flush sockets generally
Make a new base class for objects that link a socket to the server
I feel really embarrassed about this one. It should never have worked without
this made static, as this structure pointer was used as a method table by
the library, and would have been full of stack junk. Even now it is completely
unsafe if the server has two instances of the object.
Timers that are required immediately seem to crash if they are delayed.
They are indicated by requesting tv_sec = 0. In this case we flag that such
a timer is present, and loop until this is no longer the case
The library no longer seems to be widely available, and is generally
considered obsolete. Even if it was desirable to keep it around, it
is no longer reasonably practical to keep this code from rotting.
* 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:
* modules/Location.h, rulesets/Py_BBox.h, rulesets/Py_Point3D.h,
rulesets/Py_Quaternion.h, rulesets/Py_Vector3D.h,
server/CommMDNSPublisher.cpp: Use double quotes not angle brackets
when including headers out of the cyphesis source tree.
* server/CommMDNSPublisher.cpp: Report a warning if avahi frees
a watch data structure, which is currently not implemented.
Move checks on the event type avahi requires to the callback
called by avahi, so it is only checked once. Ensure that no
events are flagged once the events have been processed.
* server/ServerRouting.h: Add accessor for client count.
* server/CommMDNSPublisher.h, server/CommMDNSPublisher.cpp:
Add alternative MDNS-SD handler using Avahi, which is preferred
over howl.
* server/server.cpp: CommMDNSPublisher is now an idler as well
as a socket.
* server/CommMDNSPublisher.cpp: Use server name rather than
"WorldForge Server" when publishing via MDNS service discovery
to avoid name clashes when using avahi.
* server/CommMDNSPublisher.cpp: Don't finalise MDNS session when an
error is detected, instead finalise in destructor, so the file
descriptor is still handled ok removing from poll set.
* configure.ac: Increment version number. Add automake options
to enforce NEWS, and distribute using bzip2.
* cyphesis.spec.in: Update rpm spec to use the tar.bz2 version of the
source.
* server/CommMDNSPublisher.cpp: Suppress some warnings due to mess
in the howl headers.
* tools/cyphesis.sh: Script to run the server as part of a binary
tarball distribution.
* client/ClientConnection.cpp, common/globals.cpp, common/globals.h,
server/CommMDNSPublisher.cpp, server/server.cpp, server/slave.cpp,
tools/cycmd.cpp: Add new port number settings for things like
peer connections, and listen sockets for an AI slave.
* server/CommUnixListener.cpp, server/CommUnixListener.h:
Parameterise socket name for listen socket.
* server/CommMDNSPublisher.cpp: Fix segfault problems by using an
RFC compliant service type. Fill out the error handling and
reporting and clean out the debug output.