Art Cancro [Thu, 5 Nov 2009 18:00:00 +0000 (18:00 +0000)]
* When performing a network poll of another Citadel node, connecting to a node other than the one we were expecting is now an error condition that causes processing to immediately stop.
Dave West [Tue, 3 Nov 2009 12:34:30 +0000 (12:34 +0000)]
Add some comments to rename_user indicating why the code is bad.
It traverses an unlocked context list and it leaves a big hole for
the actual operation to do something unexpected.
Art Cancro [Mon, 2 Nov 2009 17:21:33 +0000 (17:21 +0000)]
* Completed the code to revert a wiki page to a previous version with just one click. Combined with the previous commit, the code paths for 'view' and 'revert' operations are now unified in both citserver and webcit.
* Re-enabled the ability to create Wiki rooms. Our wiki module is now functionally complete in a barebones sort of way, and the on-disk format is finalized. I will probably add some more bells and whistles (such as 'compare versions') before the final release.
Dave West [Mon, 2 Nov 2009 13:15:52 +0000 (13:15 +0000)]
Added a new command line option to citserver "-s" takes a numerical parameter.
When this is specified with a number greater than 0 the server will start
almost as normal except it will not start any workers or module related
threads.
Instead it will create the specified number of simulation threads and time
how long it takes for them to be created, create a context, delete the
context and get cleaned up. A message is written to the log stating how long
it took and then the server will exit normally.
This is to help tune the client connection code and thread creation stuff.
Dave West [Sun, 1 Nov 2009 18:09:14 +0000 (18:09 +0000)]
Fixed the bug that prevented DOWN from working properly.
Also broke the context handling routines out of sysdep.c and other places
and put them in context.c / .h
This has been done to make it easier to improve the speed with which we
create / destroy contexts and threads.
Dave West [Sat, 31 Oct 2009 15:29:37 +0000 (15:29 +0000)]
Fixed a bug in the threading code that would prevent new threads starting.
It was possible for threads that are running (not idle) to still be
marked as Blocked (idle).
Also Identified another problem that could prevent threads from starting.
If all existing worker threads were given a task during the same GC tick
then the system load average would go to 100% and prevent new threads.
This was due to a bad method of calculating the load average. We always
wanted the machine load average to limit the creation of new threads
so that the machine didn't become overloaded. Now we get the machine load
and use that to limit new threads. We also log a WARNING in this event.
Art Cancro [Fri, 30 Oct 2009 19:45:08 +0000 (19:45 +0000)]
* Noticed something that was technically correct but confusing: when viewing a wiki history, each line displayed the date and author of the diff, which is NOT the same thing as the date and author of the page you would get if you reverted to that version. Configured some off-by-one logic in the display code to compensate for this. As an added bonus, the last line, which simply displayed an empty message, has been replaced by a new first line, which displays the date and author of the current version.
Art Cancro [Fri, 30 Oct 2009 04:32:42 +0000 (04:32 +0000)]
* Performing a 'fetch' operation on an old revision of a wiki page now stuffs the reverted version into a room called '9999999999.WikiWaybackMachine'. Due to the invalid namespace, the DAP will clean up after us later.
Art Cancro [Tue, 27 Oct 2009 15:40:27 +0000 (15:40 +0000)]
* Added the code to let display_wiki_page_backend() know when it's expected to fetch a specific revision of a wiki page. Stopped cold dead when I realized that it's going to be practically impossible to supply read_message() with anything other than a message number.
Dave West [Sun, 25 Oct 2009 22:05:03 +0000 (22:05 +0000)]
A little more with the API coding style.
Also added following functions
CtdlGetFloorByName Gets floor by name. Return -1 if not found.
CtdlGetFloorByNameLock As above but locks the floors.
CtdlGetAvailableFloor Returns number of first unused floor.
These functions make use of the floor cache for performance.
The idea is if you want to create a floor you first check that the name
is available with CtdlGetFloorByNameLock
If the name is available you get -1 back and you then do CtdlGetAvailableFloor
Now you have a floor number to use so you can CtdlGetFloor and fill in the
structure information before doing CtdlPutFloorLock
* check for the PAM lib in every case, since if we detect the functions we need to link it
* check for user modules before referencing them in the VDIR build
* new token to put in the actual filename (just works when debugging enabled)
* catch possible access to not set token parameter; off by one. usualy requester should check if the token is there in advance.
* check for presence of token in preferences before accessing it
Art Cancro [Wed, 21 Oct 2009 17:30:28 +0000 (17:30 +0000)]
* New command 'WIKI history|<pagename>' to list the revision history for a wiki page.
* History format has changed again -- delete any experimental wiki rooms you have created. The memo field now contains a UUID for each edit, which we will use for identifying revisions because the MIME part numbers will change with each edit. Also moved the timestamp into the second field position, followed by the username and nodename. No longer saving the user's Internet email address.
* add way to have tokens do their custom parse-time preevaluation; this involves an api change to the RegisterNS function
* load iterators by the new parse time evaluator, not at runtime; Now we can find non-existant iterators at parse-time.
Dave West [Sat, 17 Oct 2009 12:21:17 +0000 (12:21 +0000)]
Citadel API clean up.
Moved public function prototypes for room operations into ctdl_module.h and
renamed them to match the documented naming convention.
Art Cancro [Fri, 16 Oct 2009 20:58:22 +0000 (20:58 +0000)]
* Changed my mind about the on-disk format for wiki history. DELETE ANY WIKI ROOMS YOU MAY HAVE ALREADY CREATED. We now do wiki history backwards. In other words, the diffs in each part would be applied top to bottom in order to revert to older and older versions. Theoretically if you apply them all the way through you would end up with an empty page. This will allow revision control to work properly even with a partial history.
Art Cancro [Fri, 16 Oct 2009 03:35:09 +0000 (03:35 +0000)]
* Write wiki history (diffs) to disk upon each save
* Added code to preven the wiki history hook from infinitely recursing
* Diff against /dev/null if no history exists in order to provide a nice 'version 1'
* add K (after j...) escaper for combined html + json;
* escape mail subjects and senders with 'K'; This will fix problems with html tags in mailsubjects
Art Cancro [Wed, 14 Oct 2009 21:49:46 +0000 (21:49 +0000)]
* Generate diffs old-to-new instead of new-to-old. I think this will be easier to work with because we can just append. Maybe I'll change my mind again. Right now it's just writing them to the log. In a little while I'll start writing them to disk and we'll see how it goes.
Art Cancro [Wed, 14 Oct 2009 21:44:37 +0000 (21:44 +0000)]
* Generate diffs old-to-new instead of new-to-old. I think this will be easier to work with because we can just append. Maybe I'll change my mind again. Right now it's just writing them to the log. In a little while I'll start writing them to disk and we'll see how it goes.
Art Cancro [Wed, 14 Oct 2009 19:20:06 +0000 (19:20 +0000)]
* Began (but did not finish) applying GPL3+ declarations to each source file. This will be an ongoing process. (I'm about to mix GPL2+ code with GPL3+ code, and would like to be able to immediately throw the 'any later version' clause back at anyone who whines about it.)