- Nov 11, 2015
-
-
Andrew Price authored
Also get rid of some unnecessary global variables.
-
- Nov 07, 2015
-
-
Andrew Price authored
Makes sure we don't create the directories with root ownership. Also make mwserv's stdout line buffered to work better with logging systems which capture stdout.
-
Andrew Price authored
(And less shouty.)
-
- Nov 06, 2015
-
-
Andrew Price authored
-
Andrew Price authored
-
- Oct 31, 2015
-
-
Andrew Price authored
This moves the folder index, text, moderation and tmp files into directories corresponding to the file name suffixes currently in use. Old New --- --- STATEDIR/foo.i STATEDIR/index/foo STATEDIR/foo.i.m STATEDIR/index/mod/foo STATEDIR/foo.i.t STATEDIR/index/new/foo STATEDIR/foo.t STATEDIR/text/foo STATEDIR/foo.t.m STATEDIR/text/mod/foo STATEDIR/foo.t.t STATEDIR/text/new/foo This has the following advantages: 1. No more ugly folder path building all over the place 2. STATEDIR and PATHSIZE used in far fewer places 3. No longer assumes paths to folder files will fit in 256 chars 4. A tidier STATEDIR 5. Better separation of concerns (more folder stuff hidden in folders.c) 6. Should make it easier to move the folder stuff into the server 7. Improved error checking/reporting This makes use of the *at family of syscalls so, instead of building paths, we now use file descriptors.
-
- Oct 23, 2015
-
-
Andrew Price authored
Also switch to pread.
-
Andrew Price authored
-
Andrew Price authored
-
Andrew Price authored
-
Andrew Price authored
Wrap the userposn and struct person in a new user structure which can be used to pass around all of the date related to the user, not just the on-disk bits. This should make things easier down the line when replacing the users.bb format with a more flexible one.
-
- Oct 21, 2015
-
-
Andrew Price authored
Now the client can use it too if necessary.
-
Andrew Price authored
Move the bits which specified the default server options and config file paths out of the config system. Add some bits to simplify constructing an array of default config options.
-
- Oct 19, 2015
-
-
Andrew Price authored
-
- Oct 18, 2015
-
-
Andrew Price authored
Until now configuring mwserv has been limited to command line options and build configuration. This config system should make things a bit more flexible by adding the ability to load bits and pieces from a json config file (or many json config files). This is how it works: 1. A json object 'cfg' is built containing the build-time defaults for each config option recognised by mwserv. This will be used to validate the options in config files later. 2. A json config file in the user's home directory is loaded if it exists. It does not have to be complete: its contents will be merged into the defaults. Unrecognised options are ignored. 3. Otherwise, a config file in /etc is loaded and used similarly. 4. Command line options are parsed and the cfg object is updated with cfg_set_* in the order in which the options are found. 4a. If the [--config|-c <file>] option is encountered, the file is loaded and merged into the cfg object as before. 5. Once all of the config information is gathered and merged into the cfg object, if the [--print-config|-P] option was given, the final merged config is printed in json format (mwserv then exits). 6. Config options are then accessed using the cfg_get_* type-specific functions. This should allow the build system to be simplified in future, e.g. 'make test' could go away in favour of using ~/.mwserv.conf to store the test environment configuration. For now, the place to add new config options and their default values is in cfg_init_defaults() in servercfg.c.
-
- Oct 17, 2015
-
-
Andrew Price authored
Tip: this can be avoided by adding this to your .vimrc: match ErrorMsg '\s\+$'
-
- Oct 12, 2015
-
-
Andrew Price authored
-
- Oct 08, 2015
-
-
Justin Mitchell authored
-
- Oct 07, 2015
-
-
Justin Mitchell authored
-
- Oct 06, 2015
-
-
Andrew Price authored
Also disable building libmozjs.so and tidy up the mozjs-related make rules/variables.
-
Justin Mitchell authored
-
Justin Mitchell authored
-
- Oct 05, 2015
-
-
Justin Mitchell authored
-
Justin Mitchell authored
-
- Oct 02, 2015
-
-
Justin Mitchell authored
-
Justin Mitchell authored
-
- Sep 29, 2015
-
-
Justin Mitchell authored
Helps to display the event messages
-
Justin Mitchell authored
this moves (most of) the mrod and zod commands to the server
-
- Sep 25, 2015
-
-
Justin Mitchell authored
over to the new protocol. Should be tranformed into a request to the server to perform an action, followed by a response and an announcment of wether the command succeeded.
-
- Sep 24, 2015
-
-
Justin Mitchell authored
-
Justin Mitchell authored
-
- Sep 22, 2015
-
-
Justin Mitchell authored
Needs work: message head is currently pid of sender, needs to be userposn of sender instead/aswell
-
- Sep 21, 2015
-
-
Justin Mitchell authored
-
Justin Mitchell authored
Prep work for persistant/replay messaging; Add serial numbers and datestamps to every message processed by the server, fix timestamp printing to use those values instead of wallclock
-
- Nov 02, 2013
-
-
Andrew Price authored
-
- Nov 01, 2013
-
-
Andrew Price authored
-
Andrew Price authored
Rejig the user file code into user.{c,h} as before, we could do with a function to iterate over the user file entries to remove some duplicate code and abstract this stuff away.
-
- Oct 31, 2013
-
-
Andrew Price authored
Split out the who file stuff from files.* into who.* and tidy up the code a bit. Intention here is to modularise the who file code so that it can be replaced with a server-managed sqlite db (or whatever) easily in future. There's still a lot of code which does its own operations on the who file with read() and lseek() so a good next step will be to hide that code behind an iterator or similar.
-
Andrew Price authored
- Move as much of mw into src/client/ as possible - Make sure everything that mwserv and webclient require is in src/ - Build a libmw.a from src/*.o to make linking easier - Rejig and simplify some Makefile rules This should help to make it clear which bits of code are shared and which are specific to the UI. We should avoid putting any user interface stuff into libmw.a as a rule. TODO: - Improve some file names (e.g. sqlite.{c,h} is a silly name) - Fix building the utils - Add sensible svn:ignores to src/client
-
- Feb 13, 2013
-
-
Justin Mitchell authored
-