Commit graph

50 commits

Author SHA1 Message Date
Erik Ogenvik
7ec0ea3dd4 Integrate signal handling with boost::asio.
When a signal is caught we want to exit from the boost::asio loop.
However, we can't do this by pusing another handler onto the io_service,
since this will involve a malloc call, and this can cause a deadlock (if
the signal handler is invoked from within a malloc call).
Therefore we instead need to use the signal_set functionality of
boost::asio, which guarantees that signal handling is done without
issue.
2015-04-10 22:00:56 +02:00
Erik Ogenvik
4927359009 Don't allocate memory in signal handlers. 2015-04-09 13:44:26 +02:00
Erik Ogenvik
d8bd6147e5 Avoid memory allocation in segfaults.
When reporting the segfault we can't allocate any memory, since the
stack might have become corrupted. Using std::string allocates memory,
so we'll opt for the lower level fprintf().
2014-06-04 10:27:44 +02:00
Erik Ogenvik
a287ca4429 Break out of io_service loop when exiting.
The io_service might be waiting inside a run_one call. This makes sure
that it exits as soon as the exit flag is set.
2014-02-04 15:56:46 +01:00
Erik Ogenvik
20be06aef7 Added "soft" exit option.
A "soft" exit tries to first query any external minds for their
thoughts, so that they can be persisted. This might take up to five
seconds.
2013-08-21 20:53:40 +02:00
Olek Wojnar
7f9ff2246d Remove CVS $Id tags
The legacy tags are causing build issues in Debian.
2013-07-15 20:31:59 +02:00
Alistair Riddoch
1a2cb53470 Fix some stray warnings 2012-01-30 15:14:05 +00:00
Alistair Riddoch
c5475d4929 Move UID and PID related system independent functions into their own files to reduce linking issues. 2010-07-12 18:46:42 +01:00
Alistair Riddoch
3d1c6bd27d Move system indenpendant get_hostname() function into its own file to reduce linking complications. 2010-07-12 18:45:17 +01:00
Alistair Riddoch
252a8c5797 Move to winsock2.h and put it in a saner place. 2010-07-12 18:43:14 +01:00
Alistair Riddoch
c655a77893 Correct a comment around pre-processor stuff. 2009-09-19 19:19:32 +01:00
Alistair Riddoch
d738e472a4 Clean up the pre-processor namespace after it gets messed up by some systems. 2009-09-18 12:19:21 +01:00
Al Riddoch
748aa23acd 2008-11-07 Al Riddoch <alriddoch@googlemail.com>
* common/system.cpp: Check the result of fwrite() when writing a
	  keyfile to disk.
2008-11-07 01:41:54 +00:00
Al Riddoch
67a9d94314 2008-11-03 Al Riddoch <alriddoch@googlemail.com>
* 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.
2008-11-03 17:12:31 +00:00
Al Riddoch
db6692d693 2008-11-01 Al Riddoch <alriddoch@googlemail.com>
* common/system.cpp: Free a temporary buffer used to store
	  intermediate data when hashing a password.
2008-11-01 02:38:32 +00:00
Al Riddoch
584669d9c6 2008-08-12 Al Riddoch <alriddoch@googlemail.com>
* common/system.cpp, common/system.h: Add a function for getting
	  the time stamp from a file.
2008-08-12 20:40:14 +00:00
Al Riddoch
74705d8d2c 2008-04-19 Al Riddoch <alriddoch@googlemail.com>
* common/system.cpp, common/system.h: Add a security setup function
	  which creates a persistent server identity.
2008-04-19 03:44:06 +00:00
Al Riddoch
66061d0c62 2008-04-13 Al Riddoch <alriddoch@googlemail.com>
* common/system.cpp: Add test code to generate unique cryptographic
	  server identity.
2008-04-13 02:22:21 +00:00
Al Riddoch
5c2df225c1 2008-01-05 Al Riddoch <alriddoch@googlemail.com>
* common/system.cpp: Use PACKAGE_BUGREPORT from autoconf for the
	  email address to report bugs to in error messages.
2008-01-05 01:33:55 +00:00
Al Riddoch
733cc79989 2007-12-06 Al Riddoch <alriddoch@zepler.org>
* 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.
2007-12-06 23:50:14 +00:00
Al Riddoch
87ecdcad4b 2007-07-30 Al Riddoch <alriddoch@zepler.org>
* client/Py_CreatorClient.cpp, common/Database.cpp,
	  common/accountbase.cpp, common/system.cpp, rulesets/Character.cpp,
	  rulesets/Motion.cpp, rulesets/Plant.cpp, rulesets/Py_Location.cpp,
	  rulesets/Py_Mind.cpp, rulesets/Py_Operation.cpp,
	  rulesets/Py_Point3D.cpp, rulesets/Py_Statistics.cpp,
	  rulesets/Py_Task.cpp, rulesets/Py_TerrainProperty.cpp,
	  rulesets/Py_Thing.cpp, rulesets/Py_Vector3D.cpp,
	  rulesets/Py_WorldTime.cpp, rulesets/Python_API.cpp,
	  rulesets/TerrainProperty.cpp, server/Admin.cpp,
	  server/CommServer.cpp, server/Connection.cpp,
	  server/EntityFactory.cpp, server/WorldRouter.cpp,
	  tools/cycmd.cpp, tools/cyconvertrules.cpp, tools/cyctrl.cpp:
	  Remove unnecessary () from conditional expressions, where operator
	  binding is clear.
2007-07-30 18:12:50 +00:00
Al Riddoch
843af89f21 2007-05-30 Al Riddoch <alriddoch@zepler.org>
* common/system.cpp: Add support for SIGINFO on BSD systems and
	  report something vaguely useful.
2007-05-31 05:03:38 +00:00
Al Riddoch
03aa06771d 2006-11-03 Al Riddoch <alriddoch@zepler.org>
* configure.ac: Add tests for more optional functions and headers.

	* client/ObserverClient.cpp: Use alternative on systems which don't
	  have usleep().

	* common/system.cpp: Implement gettimeofday for systems which don't
	  have it.

	* server/CommListener.cpp: Add a note about supporting alternatives
	  to inet_ntop.

	* server/CommUnixListener.cpp, server/server.cpp: Disable the unix
	  listen socket on systems which don't have it.

	* tests/systemtest.cpp: Fix the test to work on systems without fork()
	  or kill(), and add a test for the substitute gettimeofday
	  implementation.
2006-11-03 18:55:40 +00:00
Al Riddoch
e49281a971 2006-11-01 Al Riddoch <alriddoch@zepler.org>
* common/system.h: Add prototypes for required C library functions
	  we implement on systems where they are missing.

	* common/system.cpp: Adapt the system specific code for systems
	  which are missing libc functions are system calls, including
	  uname, getuid, nice, fork, kill and some of the signals.
2006-11-02 02:38:15 +00:00
Al Riddoch
9a56dac06c 2006-10-26 Al Riddoch <alriddoch@zepler.org>
* Add RCS Id keywords to every file, for better version tracking.
2006-10-26 00:48:00 +00:00
Al Riddoch
6eb49b73ba 2006-09-24 Al Riddoch <alriddoch@zepler.org>
* common/log.h, common/log.cpp: Add a new function to rotate
	  the logs, eliminate duplicate code by breaking out log opening
	  code into a static function.

	* common/system.cpp: Add a HUP system call handler to rotate the logs.
2006-09-24 23:10:08 +00:00
Al Riddoch
5c4777c3a0 2006-09-20 Al Riddoch <alriddoch@zepler.org>
* common/system.cpp: When creating a daemon, create the new session
	  earilier, and change current working directory to / to ensure the
	  daemon does not interfere with the system.
2006-09-20 01:48:30 +00:00
Al Riddoch
c88f69e288 2006-07-07 Al Riddoch <alriddoch@zepler.org>
* common/system.cpp: Remove FIXME about nice option which has already
	  been implemented.
2006-07-07 14:26:30 +00:00
Al Riddoch
4149f01c4c 2006-06-08 Al Riddoch <alriddoch@zepler.org>
* common/system.cpp: Add a message to the crash handlers giving
	  an email address to report bugs to.
2006-06-08 20:45:00 +00:00
Al Riddoch
8b38db23cc 2006-05-16 Al Riddoch <alriddoch@zepler.org>
* common/system.cpp: Return 0 on security check fail, as -1 is
	  signed.

	* server/Connection.cpp: Re-order logging messages so that messages
	  reflect the fact the a broken connection occurs before the
	  subscriptions associated with that connection can be dropped.
	  Implement logging out just specific objects without closing the
	  connection.
2006-05-16 21:44:26 +00:00
Al Riddoch
87c650e793 2006-05-12 Al Riddoch <alriddoch@zepler.org>
* server/server.cpp: Add option to control the increased nice level
	  the server runs at.
2006-05-11 23:33:58 +00:00
Al Riddoch
2db3e48243 2006-05-02 Al Riddoch <alriddoch@zepler.org>
* common/system.cpp, common/system.h: Add a function to increment nice
	  value for the server. Change security check to return unsigned, as
	  the magic number is in fact unsigned.

	* server/server.cpp: Call system function to increment nice, thus
	  reducing priority once setup is complete.
2006-05-02 14:06:35 +00:00
Al Riddoch
011a5652fc 2006-03-25 Al Riddoch <alriddoch@zepler.org>
* common/system.h, common/system.cpp: Add security check function
	  which for now just ensures cyphesis is not run as root.

	* server/server.cpp: Use security check function when starting
	  the server.
2006-03-25 10:55:53 +00:00
Al Riddoch
fac57eee73 2006-01-19 Al Riddoch <alriddoch@zepler.org>
* aiclient/ClientAccount.cpp, aiclient/ClientAccount.h,
	  aiclient/ClientConnection.cpp, aiclient/ClientConnection.h,
	  aiclient/client.cpp, aiclient/client.h, client/BaseClient.cpp,
	  client/BaseClient.h, client/CharacterClient.cpp,
	  client/CharacterClient.h, client/ClientConnection.cpp,
	  client/ClientConnection.h, client/CreatorClient.cpp,
	  client/CreatorClient.h, client/ObserverClient.cpp,
	  client/ObserverClient.h, client/Py_CreatorClient.cpp,
	  client/Py_CreatorClient.h, client/client.cpp,
	  client/define_world.cpp, client/define_world.h, common/Add.h,
	  common/Affect.h, common/AtlasFileLoader.cpp,
	  common/AtlasFileLoader.h, common/Attack.h, common/BaseEntity.cpp,
	  common/BaseEntity.h, common/BaseWorld.cpp, common/BaseWorld.h,
	  common/Burn.h, common/Chop.h, common/Connect.h, common/CustomOp.cpp,
	  common/CustomOp.h, common/CustomOp_impl.h, common/Cut.h,
	  common/Database.cpp, common/Database.h, common/Delve.h, common/Dig.h,
	  common/Eat.h, common/FormattedXMLWriter.cpp,
	  common/FormattedXMLWriter.h, common/Generic.h, common/Load.h,
	  common/Monitor.h, common/Mow.h, common/Nourish.h,
	  common/OOGThing.cpp, common/OOGThing.h, common/Property.cpp,
	  common/Property.h, common/Property_impl.h, common/Save.h,
	  common/Setup.h, common/Tick.h, common/Unseen.h, common/Update.h,
	  common/Use.h, common/Wield.h, common/accountbase.cpp,
	  common/accountbase.h, common/const.cpp, common/const.h,
	  common/custom.cpp, common/debug.h, common/globals.cpp,
	  common/globals.h, common/id.cpp, common/id.h, common/inheritance.cpp,
	  common/inheritance.h, common/inheritance_impl.h, common/log.cpp,
	  common/log.h, common/newid.cpp, common/nls.h, common/op_switch.h,
	  common/operations.cpp, common/operations.h, common/random.h,
	  common/refno.h, common/serialno.cpp, common/serialno.h,
	  common/system.cpp, common/system.h, common/terrain_utils.cpp,
	  common/terrain_utils.h, common/type_utils.h, common/types.h,
	  common/utility.cpp, common/utility.h, modules/DateTime.cpp,
	  modules/DateTime.h, modules/Location.cpp, modules/Location.h,
	  modules/WorldTime.cpp, modules/WorldTime.h, physics/BBox.cpp,
	  physics/BBox.h, physics/Collision.cpp, physics/Collision.h,
	  physics/Quaternion.cpp, physics/Quaternion.h, physics/Vector3D.cpp,
	  physics/Vector3D.h, physics/VectorPol.h, rulesets/Area.cpp,
	  rulesets/Area.h, rulesets/AreaProperty.cpp, rulesets/AreaProperty.h,
	  rulesets/ArithmeticScript.cpp, rulesets/ArithmeticScript.h,
	  rulesets/BaseMind.cpp, rulesets/BaseMind.h,
	  rulesets/CalendarProperty.cpp, rulesets/CalendarProperty.h,
	  rulesets/Character.cpp, rulesets/Character.h, rulesets/Combat.cpp,
	  rulesets/Combat.h, rulesets/Container.cpp, rulesets/Container.h,
	  rulesets/Creator.cpp, rulesets/Creator.h, rulesets/Entity.cpp,
	  rulesets/Entity.h, rulesets/EntityProperties.cpp,
	  rulesets/Entity_getLocation.h, rulesets/Fell.cpp, rulesets/Fell.h,
	  rulesets/Food.cpp, rulesets/Food.h, rulesets/Line.cpp,
	  rulesets/Line.h, rulesets/LineProperty.cpp, rulesets/LineProperty.h,
	  rulesets/MemEntity.cpp, rulesets/MemEntity.h, rulesets/MemMap.cpp,
	  rulesets/MemMap.h, rulesets/MemMap_methods.h,
	  rulesets/MindFactory.cpp, rulesets/MindFactory.h, rulesets/Missile.h,
	  rulesets/Motion.cpp, rulesets/Motion.h, rulesets/Movement.cpp,
	  rulesets/Movement.h, rulesets/Pedestrian.cpp, rulesets/Pedestrian.h,
	  rulesets/Plant.cpp, rulesets/Plant.h, rulesets/Py_BBox.cpp,
	  rulesets/Py_BBox.h, rulesets/Py_EntityWrapper.h,
	  rulesets/Py_Location.cpp, rulesets/Py_Location.h,
	  rulesets/Py_Map.cpp, rulesets/Py_Map.h, rulesets/Py_Mind.cpp,
	  rulesets/Py_Mind.h, rulesets/Py_Object.cpp, rulesets/Py_Object.h,
	  rulesets/Py_Operation.cpp, rulesets/Py_Operation.h,
	  rulesets/Py_Oplist.cpp, rulesets/Py_Oplist.h, rulesets/Py_Optime.cpp,
	  rulesets/Py_Optime.h, rulesets/Py_Point3D.cpp, rulesets/Py_Point3D.h,
	  rulesets/Py_Property.cpp, rulesets/Py_Property.h,
	  rulesets/Py_Quaternion.cpp, rulesets/Py_Quaternion.h,
	  rulesets/Py_RootEntity.cpp, rulesets/Py_RootEntity.h,
	  rulesets/Py_Statistics.cpp, rulesets/Py_Statistics.h,
	  rulesets/Py_Task.cpp, rulesets/Py_Task.h, rulesets/Py_Thing.cpp,
	  rulesets/Py_Thing.h, rulesets/Py_Vector3D.cpp,
	  rulesets/Py_Vector3D.h, rulesets/Py_World.cpp, rulesets/Py_World.h,
	  rulesets/Py_WorldTime.cpp, rulesets/Py_WorldTime.h,
	  rulesets/PythonArithmeticScript.cpp,
	  rulesets/PythonArithmeticScript.h, rulesets/PythonMindScript.cpp,
	  rulesets/PythonMindScript.h, rulesets/PythonScript.cpp,
	  rulesets/PythonScript.h, rulesets/PythonThingScript.cpp,
	  rulesets/PythonThingScript.h, rulesets/PythonWrapper.cpp,
	  rulesets/PythonWrapper.h, rulesets/Python_API.cpp,
	  rulesets/Python_API.h, rulesets/Python_Script_Utils.h,
	  rulesets/Script.cpp, rulesets/Script.h, rulesets/Stackable.cpp,
	  rulesets/Stackable.h, rulesets/Statistics.cpp, rulesets/Statistics.h,
	  rulesets/StatisticsProperty.cpp, rulesets/StatisticsProperty.h,
	  rulesets/Structure.cpp, rulesets/Structure.h, rulesets/Task.cpp,
	  rulesets/Task.h, rulesets/TaskScript.cpp, rulesets/TaskScript.h,
	  rulesets/TerrainProperty.cpp, rulesets/TerrainProperty.h,
	  rulesets/Thing.cpp, rulesets/Thing.h, rulesets/ThingFactory.cpp,
	  rulesets/ThingFactory.h, rulesets/World.cpp, rulesets/World.h,
	  rulesets/attributes.h, server/Account.cpp, server/Account.h,
	  server/Admin.cpp, server/Admin.h, server/ArithmeticFactory.cpp,
	  server/ArithmeticFactory.h, server/CommClient.cpp,
	  server/CommClient.h, server/CommIdleSocket.cpp,
	  server/CommIdleSocket.h, server/CommListener.cpp,
	  server/CommListener.h, server/CommLocalClient.cpp,
	  server/CommLocalClient.h, server/CommMDNSPublisher.cpp,
	  server/CommMDNSPublisher.h, server/CommMaster.cpp,
	  server/CommMaster.h, server/CommMetaClient.cpp,
	  server/CommMetaClient.h, server/CommPSQLSocket.cpp,
	  server/CommPSQLSocket.h, server/CommPeer.cpp,
	  server/CommPeer.h, server/CommPeerListener.cpp,
	  server/CommPeerListener.h, server/CommRemoteClient.cpp,
	  server/CommRemoteClient.h, server/CommServer.cpp,
	  server/CommServer.h, server/CommSlaveClient.cpp,
	  server/CommSlaveClient.h, server/CommSlaveListener.cpp,
	  server/CommSlaveListener.h, server/CommSocket.cpp,
	  server/CommSocket.h, server/CommUnixListener.cpp,
	  server/CommUnixListener.h, server/Connection.cpp,
	  server/Connection.h, server/Connection_methods.h,
	  server/EntityFactory.cpp, server/EntityFactory.h,
	  server/ExternalMind.cpp, server/ExternalMind.h,
	  server/Idle.cpp, server/Idle.h, server/Lobby.cpp, server/Lobby.h,
	  server/Master.cpp, server/Master.h, server/Peer.cpp, server/Peer.h,
	  server/Persistance.cpp, server/Persistance.h,
	  server/PersistantThingFactory.cpp, server/PersistantThingFactory.h,
	  server/PersistantThingFactory_impl.h, server/Persistor.cpp,
	  server/Persistor.h, server/Persistor_impl.h,
	  server/Player.cpp, server/Player.h, server/Restoration.cpp,
	  server/Restoration.h, server/Restorer.cpp, server/Restorer.h,
	  server/Restorer_impl.h, server/ScriptFactory.cpp,
	  server/ScriptFactory.h, server/ServerRouting.cpp,
	  server/ServerRouting.h, server/ServerRouting_methods.h,
	  server/SlaveClientConnection.cpp, server/SlaveClientConnection.h,
	  server/TaskFactory.cpp, server/TaskFactory.h,
	  server/TrustedConnection.cpp, server/TrustedConnection.h,
	  server/WorldRouter.cpp, server/WorldRouter.h,
	  server/server.cpp, server/server.h, server/slave.cpp,
	  tests/Areatest.cpp, tests/BaseEntitytest.cpp,
	  tests/Charactertest.cpp, tests/Containertest.cpp,
	  tests/Creatortest.cpp, tests/EntityExerciser.h,
	  tests/EntityFactorytest.cpp, tests/Entitytest.cpp,
	  tests/Foodtest.cpp, tests/IGEntityExerciser.h,
	  tests/Linetest.cpp, tests/Locationtest.cpp, tests/OOGThingtest.cpp,
	  tests/Planttest.cpp, tests/Propertytest.cpp, tests/Stackabletest.cpp,
	  tests/Structuretest.cpp, tests/Tasktest.cpp, tests/TestWorld.h,
	  tests/Thingtest.cpp, tests/WorldTimetest.cpp, tests/Worldtest.cpp,
	  tests/allOperations.h, tests/collisiontest.cpp, tests/consttest.cpp,
	  tests/distancetest.cpp, tests/emergencetest.cpp,
	  tests/inheritancetest.cpp, tests/logtest.cpp, tests/randomtest.cpp,
	  tests/systemtest.cpp, tests/transformtest.cpp,
	  tests/type_utilstest.cpp, tests/utilitytest.cpp,
	  tools/AdminClient.cpp, tools/AdminClient.h, tools/cyaddrules.cpp,
	  tools/cycmd.cpp, tools/cyconfig.cpp, tools/cyconvertrules.cpp,
	  tools/cyctrl.cpp, tools/cydbload.cpp, tools/cydumprules.cpp,
	  tools/cyisoload.cpp, tools/cyloadrules.cpp, tools/cypasswd.cpp,
	  tools/cywatchdog.cpp: Replace the copyright and license statements
	  with new versions that include disclaimer of warranty, and
	  permit distribution under later versions of the GPL.
2006-01-19 02:17:06 +00:00
Al Riddoch
c4953726da 2005-10-05 Al Riddoch <alriddoch@zepler.org>
* common/system.cpp: Replace SA_ONESHOT with SA_RESETHAND is it
	  seems to be a more portable way to do the same thing.
2005-10-05 21:48:38 +00:00
Al Riddoch
45c16225a6 2005-09-20 Al Riddoch <alriddoch@zepler.org>
* common/system.cpp: Make sure cassert is included before assert
	  macro is used.

	* common/Makefile.am: Add missing header.

	* data/Makefile.am: Install copies of the config files in
	  the documentation directory for reference.
2005-09-20 16:50:30 +00:00
Al Riddoch
17efaeda47 2005-09-15 Al Riddoch <alriddoch@zepler.org>
* common/system.cpp, common/system.h: Add new functions for handling
	  encrypted password hashes with a salt, based on gcrypt rather
	  than openssl. Include legacy support for hashes without a salt.

	* common/const.cpp: Add a salt to the default admin password.

	* tests/systemtest.cpp: Modify the password tests to use the new
	  functions.

	* server/Connection.cpp, server/Connection.h,
	  server/TrustedConnection.cpp, server/TrustedConnection.h:
	  Update the login code to use the new password functions.
2005-09-15 01:10:01 +00:00
Al Riddoch
e4aa444f3c 2004-11-29 Al Riddoch <alriddoch@zepler.org>
* common/BaseEntity.cpp, common/BaseEntity.h, common/BaseWorld.cpp,
	  common/BaseWorld.h, common/Burn.h, common/Chop.h, common/Cut.h,
	  common/Database.cpp, common/Database.h, common/Eat.h,
	  common/Generic.h, common/Load.h, common/Nourish.h,
	  common/OOGThing.cpp, common/OOGThing.h, common/Save.h,
	  common/Setup.h, common/Tick.h, common/accountbase.cpp,
	  common/accountbase.h, common/const.cpp, common/const.h,
	  common/custom.cpp, common/debug.h, common/globals.cpp,
	  common/globals.h, common/inheritance.cpp, common/inheritance.h,
	  common/log.cpp, common/log.h, common/op_switch.h, common/random.h,
	  common/serialno.h, common/system.cpp, common/system.h,
	  common/type_utils.h, common/types.h, common/utility.cpp,
	  common/utility.h: Update copyright dates in files as appropriate.
2004-11-29 21:42:00 +00:00
Al Riddoch
71618d7b00 2004-05-07 Al Riddoch <alriddoch@zepler.org>
* server/server.cpp, common/globals.cpp, client/client.cpp:
	  Workaround C++s nasty implicit conversion behavoir.

	* common/system.cpp: Be smarted about POSIX signal handling for
	  segfaults and aborts.

	* Update TODO.
2004-05-08 18:44:34 +00:00
Al Riddoch
e19b40eb08 2004-05-07 Al Riddoch <alriddoch@zepler.org>
* common/system.cpp: Add handler for abort signals so they can be
	  reported in the logs.
2004-05-07 00:03:25 +00:00
Al Riddoch
e43648ab9a 2004-05-07 Al Riddoch <alriddoch@zepler.org>
* common/system.cpp: Add handler for segfaults so they can be reported
	  in the logs.
2004-05-06 23:41:10 +00:00
Al Riddoch
8f789324c1 2003-07-20 Al Riddoch <alriddoch@zepler.org>
* common/system.cpp: Add handler for SIGHUP, and clarify name of
	  signal handler. Fix error message typo.
2003-07-20 17:47:51 +00:00
Al Riddoch
cbc424fb1d Backed off unauthorised commit. 2003-05-01 22:42:54 +00:00
Chuck Hale
6e834093c2 made md5 optional, surrounded md5.h include with ifdef 2003-05-01 22:13:42 +00:00
Al Riddoch
c133040200 2003-04-24 Al Riddoch <alriddoch@zepler.org>
* common/system.cpp: Clear the string portably.

	* Add some missing headers to the source lists.
2003-04-24 13:38:43 +00:00
Al Riddoch
e530394865 2003-03-22 Al Riddoch <alriddoch@zepler.org>
* common/system.h, common/system.cpp: Add code to md5 hash
	  strings, like passwords.

	* server/Connection.cpp: Use md5 hash code for storing and
	  verifying passwords.
2003-03-22 17:00:04 +00:00
Al Riddoch
15ef748518 2003-03-07 Al Riddoch <alriddoch@zepler.org>
* Use " instead of < when including application headers.

	* Re-work the interface between server and worldrouter objects
	  so that the are less tied together, and more flexible.
2003-03-07 00:22:12 +00:00
Al Riddoch
3dd2799688 2002-10-17 Al Riddoch <alriddoch@zepler.org>
* common/system.cpp: Ignore sigpipe so we don't abort on some
	  systems if the client quits unexpectedly.
2002-10-17 23:07:52 +00:00
Al Riddoch
0a56c302fd 2002-10-10 Al Riddoch <alriddoch@zepler.org>
* init script fixes.

	* common/system.cpp: Ensure that parent of daemon exit status indicates
	  whether the daemon has started properlly.

	* server/Connection.cpp: Clarify error reporting.
2002-10-10 10:42:10 +00:00
Al Riddoch
4de89d749b 2002-10-03 Al Riddoch <alriddoch@zepler.org>
* common/system.h, common/system.cpp, server/server.cpp: Moved all
	  the system dependant signal handling and background handling
	  code into system module, and implemented propper handling of
	  going into the background, including reporting error status
	  back to the waiting parent using exit status and user signals.
2002-10-03 10:51:59 +00:00