Art Cancro [Wed, 11 Nov 2009 17:58:35 +0000 (17:58 +0000)]
* Fixed a bug that was causing the initial visit to a Wiki room to fetch the page list instead of the home page.
* Wiki page lists, including search results, are now lists of links to those pages.
Art Cancro [Wed, 11 Nov 2009 16:27:04 +0000 (16:27 +0000)]
* The 'Search' box now works properly in a Wiki room.
Art Cancro [Tue, 10 Nov 2009 22:57:23 +0000 (22:57 +0000)]
* wiki page list
Wilfried Göesgens [Tue, 10 Nov 2009 22:44:10 +0000 (22:44 +0000)]
* same bug at StrBuf_Utf8StrLen too.
Wilfried Göesgens [Tue, 10 Nov 2009 22:34:36 +0000 (22:34 +0000)]
* fix exit point in Ctdl_GetUtf8SequenceLength; condition was wrong
* fix StrHtmlEcmaEscAppend; its utf-8 sequence mechanism was deffective
* fix StrBuf_Utf8StrCut; it needs to count glyphs and bytes in different steps here
Dave West [Tue, 10 Nov 2009 22:00:45 +0000 (22:00 +0000)]
Removed an un required extern
Dave West [Tue, 10 Nov 2009 21:22:20 +0000 (21:22 +0000)]
Removed an unrequired extern declaration
Dave West [Tue, 10 Nov 2009 21:19:32 +0000 (21:19 +0000)]
Added a FIXME tag.
This module is REALY horrible to the system.
It carries out IO whilst it still has the context list locked.
That alone should merit disabling this module.
Dave West [Tue, 10 Nov 2009 21:07:22 +0000 (21:07 +0000)]
Grabbed a chunk of code out of citserver.c cmd_term() and used it to create
a new function
CtdlTerminateOtherSession()
Placed this function in context.c since it manipulates the contexts.
Exposed this function to the API
Noticed we don't seem to have a client that uses the TERM command.
Dave West [Tue, 10 Nov 2009 20:12:04 +0000 (20:12 +0000)]
Moved terminate_idles_sessions into context.c since it is purely manipulating
the context list.
Dave West [Tue, 10 Nov 2009 20:00:25 +0000 (20:00 +0000)]
Cleaned a few warnings about deprecated functions.
Dave West [Tue, 10 Nov 2009 19:47:44 +0000 (19:47 +0000)]
Code clean up.
Removed some old code that wasn't used.
Wilfried Göesgens [Tue, 10 Nov 2009 19:44:01 +0000 (19:44 +0000)]
* don't end the header, end_burst does this for us.
Dave West [Tue, 10 Nov 2009 19:39:19 +0000 (19:39 +0000)]
Moved BumpNewMailCounter() into context.c because it manipulates contexts.
Exposed it to the API as CtdlBumpNewMailCounter() and deprected the old name.
Dave West [Tue, 10 Nov 2009 19:27:46 +0000 (19:27 +0000)]
Grabbed another chunk of code out of user_ops.c, purge_user()
This chunk checked if a user was logged in by testing the user numbers
It is now a function and exposed to the API as
int CtdlIsUserLoggedInByNum(int num)
Also marked the code with a FIXME since it is unsafe, a user could log in
after the test but before the delete and realy mess things up.
Dave West [Tue, 10 Nov 2009 19:06:33 +0000 (19:06 +0000)]
Grabbed that previously noted bad code from rename_user that walked
the context list without locking. Used it to create a function
int CtdlIsUserLoggedIn (char *username)
and exposed it to the API
Oh yes and I fixed it to walk the list safely.
Wilfried Göesgens [Tue, 10 Nov 2009 19:00:48 +0000 (19:00 +0000)]
* storing the message list sort order in bbsview breaks the mailbox view. this wasn't found yet, because of a missing </script>. Disabling for now.
Art Cancro [Tue, 10 Nov 2009 18:23:07 +0000 (18:23 +0000)]
* skeleton code for a wiki pagelist screen
Art Cancro [Tue, 10 Nov 2009 18:17:50 +0000 (18:17 +0000)]
* headers_euid() needs to look at the 'E' field, not the 'U' field.
Art Cancro [Tue, 10 Nov 2009 17:36:46 +0000 (17:36 +0000)]
* removed a FIXME tag
Art Cancro [Tue, 10 Nov 2009 03:58:32 +0000 (03:58 +0000)]
* Added a new message field '1' which may be set by BeforeSave hooks. The presence of this field excludes the message from being included in the full text index.
* Set this field on wiki history pages.
Dave West [Mon, 9 Nov 2009 19:09:50 +0000 (19:09 +0000)]
Exposed logout() from user_ops.c, deprecated it in accordance with
the published coding style.
Dave West [Sun, 8 Nov 2009 22:48:01 +0000 (22:48 +0000)]
Exposed CtdlLocateMessageByEuid in ctdl_module.h and deprecated
locate_message_by_euid in euidindex.h
Another step towards the documented coding style.
Wilfried Göesgens [Sun, 8 Nov 2009 22:13:00 +0000 (22:13 +0000)]
* fix message escaping after adding attachments to the currently edited message
Wilfried Göesgens [Sun, 8 Nov 2009 20:33:04 +0000 (20:33 +0000)]
* since we load vcards as message body now, finding a vcard attachment already loaded is no mistake.
Wilfried Göesgens [Sun, 8 Nov 2009 20:32:05 +0000 (20:32 +0000)]
* forgot to change EM->em here
Dave West [Sun, 8 Nov 2009 19:25:17 +0000 (19:25 +0000)]
Clean up a comment.
Dave West [Sun, 8 Nov 2009 19:07:25 +0000 (19:07 +0000)]
Moved the prototypes of CtdlLoginExistingUser and CtdlTryPassword into
ctdl_module.h.
They constitute part of the API for modules and we shouldn't need to
include user_ops.h in modules.
Dave West [Sun, 8 Nov 2009 15:53:19 +0000 (15:53 +0000)]
Added a log message to test for a problem in worker_thread
Wilfried Göesgens [Sun, 8 Nov 2009 14:46:23 +0000 (14:46 +0000)]
* this way its fastest: range check whats allowed and mask the rest.
Wilfried Göesgens [Sun, 8 Nov 2009 11:24:03 +0000 (11:24 +0000)]
* microshits RFC Violator will just show the tinnef part of a message you reply to, so you'll get phonecalls why you send 'em back their mail. -> ignore tinnefs while replying to mails
Art Cancro [Sun, 8 Nov 2009 04:56:19 +0000 (04:56 +0000)]
* Suppress the spurious 'message_content' div that gets stuck into wiki page edits.
Art Cancro [Sun, 8 Nov 2009 04:50:42 +0000 (04:50 +0000)]
* When saving a wiki page, set the message subject to the page name. This will make it more trackable in other software.
Dave West [Sat, 7 Nov 2009 23:05:14 +0000 (23:05 +0000)]
Changed smtp sending to use a thread.
This change is the result of circumstances seen on Uncensored.
A bad host for a mailing list address was taking 4 minutes to time out.
This caused a general problem for Citadel because the EVT_TIMER event that
drive SMTP queue running was then tied up and unable to process SIEVE and
other stuff. Indeed the whole housekeeping stuff got blocked.
Basically it hilighted that we should NOT be doing IO during anything
trigered by housekeeping.
This change does nothing to improve the situation with the bad host but
it will allow housekeeping to work properly even if SMTP gets stuck.
Description of change.
======================
The outbound SMTP queue was originally processed durin an EVT_TIMER event.
This has been changed so that the event creates a thread to process the
queue and then returns.
To prevent the problem where more than one thread might be created to process
the queue a mutex is tested before the thread is created.
If the mutex is locked then no thread is created because there already is one.
If the mutex is unlocked then we lock it and create the thread.
The last operation of the thread is to unlock the mutex.
Wilfried Göesgens [Fri, 6 Nov 2009 00:13:26 +0000 (00:13 +0000)]
* predefined table is a little faster...
Wilfried Göesgens [Thu, 5 Nov 2009 23:33:40 +0000 (23:33 +0000)]
* don't use sprintf while doing urlescappend; do it in place.
Wilfried Göesgens [Thu, 5 Nov 2009 22:22:19 +0000 (22:22 +0000)]
* just calculate the language for non-static requests; else we will run this useless for every picture we deliver
struct change -> make clean
Wilfried Göesgens [Thu, 5 Nov 2009 22:20:23 +0000 (22:20 +0000)]
* first check for done before running into failed buffer reads
Wilfried Göesgens [Thu, 5 Nov 2009 22:06:52 +0000 (22:06 +0000)]
* use right function to load the room list from the server
* cheaply check for 000
Wilfried Göesgens [Thu, 5 Nov 2009 20:20:43 +0000 (20:20 +0000)]
* 64 bit int / long blablabla
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 [Thu, 5 Nov 2009 15:11:18 +0000 (15:11 +0000)]
Fix the build problems revolving around CitContext and context.h
Must have missed a make clean before I comitted.
Header file ordering and dependancies are a nightmare in modules. Sooner
I get that cleaned up to only need ctdl_module.h the better.
Wilfried Göesgens [Tue, 3 Nov 2009 21:08:25 +0000 (21:08 +0000)]
* apply the_mgts patch to fix the menu corner
* write em lowercase its in some i18n ed strings...
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.
Dave West [Tue, 3 Nov 2009 12:15:17 +0000 (12:15 +0000)]
Increased the load average before strangling the server. Its now 10.00
we will make this configureable later.
Also some cleanups in the CitContext stuff to make it a bit more readable
though I thought I had already committed those :-(
Wilfried Göesgens [Mon, 2 Nov 2009 23:33:24 +0000 (23:33 +0000)]
* don't call make distclean, this creates hickups
Wilfried Göesgens [Mon, 2 Nov 2009 21:13:39 +0000 (21:13 +0000)]
* close tag, thanks to the_mgt to find out
Wilfried Göesgens [Mon, 2 Nov 2009 20:51:48 +0000 (20:51 +0000)]
* add trailing template after the bbs view
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.
Art Cancro [Mon, 2 Nov 2009 17:11:20 +0000 (17:11 +0000)]
* Reordered the wiki rev code
Dave West [Mon, 2 Nov 2009 14:01:47 +0000 (14:01 +0000)]
Allow simulation mode to be terminated before completion
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.
Art Cancro [Mon, 2 Nov 2009 05:21:58 +0000 (05:21 +0000)]
* did some work on the wiki history reverter
Art Cancro [Mon, 2 Nov 2009 03:54:39 +0000 (03:54 +0000)]
* Made some annotations regarding bug 368 in the code.
Art Cancro [Mon, 2 Nov 2009 03:41:19 +0000 (03:41 +0000)]
* removed a spurious trace msg
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.
Wilfried Göesgens [Fri, 30 Oct 2009 20:43:01 +0000 (20:43 +0000)]
* by the_mgt: wrap a box around the knrooms treeview so it looks nicer
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 18:44:17 +0000 (18:44 +0000)]
* Completed the WebCit UI functions to view a historical version of a wiki page.
Art Cancro [Fri, 30 Oct 2009 16:39:41 +0000 (16:39 +0000)]
* Code and comments cleanup
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 [Fri, 30 Oct 2009 03:47:50 +0000 (03:47 +0000)]
* Wrote the code to fetch a particular revision of a wiki page and stuff it back into the msg base
Art Cancro [Thu, 29 Oct 2009 21:26:40 +0000 (21:26 +0000)]
* Completed the code to patch a wiki page back to the desired revision. todo: do something with the results, such as output or reply the reversion
Wilfried Göesgens [Thu, 29 Oct 2009 20:22:23 +0000 (20:22 +0000)]
* version blabla not overwrite me apt update
Wilfried Göesgens [Thu, 29 Oct 2009 19:28:09 +0000 (19:28 +0000)]
* used wrong encoding for room links
Dave West [Thu, 29 Oct 2009 17:40:39 +0000 (17:40 +0000)]
Don't register commands twice, only register them before threading begins.
Because its filling up my log unecesarily.
Art Cancro [Thu, 29 Oct 2009 13:58:39 +0000 (13:58 +0000)]
* Disable creation of wiki rooms temporarily
Wilfried Göesgens [Wed, 28 Oct 2009 22:32:40 +0000 (22:32 +0000)]
* use the new regular way to get the accept language header
Wilfried Göesgens [Wed, 28 Oct 2009 22:01:05 +0000 (22:01 +0000)]
* respect the context while sorting. Else unexpected results will follow.
Art Cancro [Wed, 28 Oct 2009 04:00:00 +0000 (04:00 +0000)]
* Parts of the wiki history reverter code
Art Cancro [Tue, 27 Oct 2009 21:02:42 +0000 (21:02 +0000)]
* skeleton/stub code for new revision control stuff
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.
Art Cancro [Tue, 27 Oct 2009 02:44:03 +0000 (02:44 +0000)]
* Added some of the buttons needed for wiki revision management
Wilfried Göesgens [Sun, 25 Oct 2009 23:30:48 +0000 (23:30 +0000)]
* more doxygen cleanup
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
Wilfried Göesgens [Sun, 25 Oct 2009 21:04:58 +0000 (21:04 +0000)]
* add doxygen config
* correct some errors in StrBufs documentation
Wilfried Göesgens [Sun, 25 Oct 2009 13:31:57 +0000 (13:31 +0000)]
* add outfunction to MSGS that just outputs ID|EUID
Wilfried Göesgens [Sun, 25 Oct 2009 11:07:25 +0000 (11:07 +0000)]
* by Feivel: check for day when highlighting weekday
Wilfried Göesgens [Sun, 25 Oct 2009 09:33:23 +0000 (09:33 +0000)]
* use macro for templateparam custom parameters
Dave West [Sun, 25 Oct 2009 01:07:14 +0000 (01:07 +0000)]
And a few more things comply with the coding style.
Dave West [Sun, 25 Oct 2009 00:26:06 +0000 (00:26 +0000)]
A few more API clean ups. Mainly revolving around user_ops.c
Dave West [Sat, 24 Oct 2009 23:30:34 +0000 (23:30 +0000)]
Fix that annoying warning about signedness.
Dave West [Sat, 24 Oct 2009 23:23:27 +0000 (23:23 +0000)]
Cleaning the API a bit more.
serv_autocompletion no longer needs to include anything but ctdl_module.h
Dave West [Sat, 24 Oct 2009 22:45:21 +0000 (22:45 +0000)]
Removed the artv_*.h files, they arent used any more.
Cleaned the API a bit, moved prototype of CtdlAccessCheck and the enum it uses
into ctdl_module.h which is where the API is defined.
Cleaned some unused includes from serv_autocompletion.c
Dave West [Sat, 24 Oct 2009 22:19:41 +0000 (22:19 +0000)]
quieten a few messages from configure when usin VPATH things.
Wilfried Göesgens [Sat, 24 Oct 2009 21:15:00 +0000 (21:15 +0000)]
* 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
Dave West [Sat, 24 Oct 2009 20:32:36 +0000 (20:32 +0000)]
Fix the VPATH build.
Dave West [Sat, 24 Oct 2009 16:52:18 +0000 (16:52 +0000)]
Fix a warning in serv_smtp.c
Dave West [Sat, 24 Oct 2009 16:36:58 +0000 (16:36 +0000)]
SVN lost this file so I re-added it.
Dave West [Sat, 24 Oct 2009 16:16:03 +0000 (16:16 +0000)]
Makefile now knows how to regenerate the svn_revision.c file
EVERYONE BOOTSTRAP!!!!!!
needed for previous alterations.
Dave West [Sat, 24 Oct 2009 15:47:01 +0000 (15:47 +0000)]
Moved the scripts that create svn_revision.c and modules_init.* into a scripts
directory to clean the base dir a bit more.
Dave West [Sat, 24 Oct 2009 15:35:16 +0000 (15:35 +0000)]
Moved some files around into sub dirs to clean up the base dir a litle.
Dave West [Sat, 24 Oct 2009 13:16:55 +0000 (13:16 +0000)]
Create some directories to hold the source files for the utility
programmes and the text client.
Basically I'm fed up trying to remember which files are for what tool.
Art Cancro [Sat, 24 Oct 2009 05:50:19 +0000 (05:50 +0000)]
* History template
Dave West [Fri, 23 Oct 2009 16:22:11 +0000 (16:22 +0000)]
Fix the Makefile.in to properly clean the user_modules tree.
marked aide_message as deprecated. Use CtdlAideMessage instead
Wilfried Göesgens [Fri, 23 Oct 2009 12:51:53 +0000 (12:51 +0000)]
rename wprintf to wc_printf; wchar.h also has a wprintf
Art Cancro [Fri, 23 Oct 2009 03:55:29 +0000 (03:55 +0000)]
* Set up links and templates for the history page, along with a nice set of toggles in the nav bar
Art Cancro [Fri, 23 Oct 2009 00:26:29 +0000 (00:26 +0000)]
* Stub functions for wiki history display
Wilfried Göesgens [Thu, 22 Oct 2009 23:04:31 +0000 (23:04 +0000)]
* add stdin for decoding tests