Dave West [Sat, 12 Dec 2009 00:41:00 +0000 (00:41 +0000)]
threads are using signals and the GC code is #ifdef if available.
This comit confuses me since I thought it was already in.
If there are problems back it out imediately.
* use different counters for the hash payloads used and hash keys used
* that way we can reduce the keys on deletion and leave the member array indices in place
* the member array might be re-organized on increase
* make the iconbar css a template
* use the #define logic for the iconbar items, first use for defines.
* thanks the_mgt for %% detection ;-)
wc_session changed, run bootstrap and make clean
Dave West [Thu, 3 Dec 2009 20:00:03 +0000 (20:00 +0000)]
For peer review.
Added two new hash manipulation functions.
int SetHashPosFromKey(HashList *Hash, const char *HKey, long HKLen, HashPos *At);
int DeleteEntryFromHash(HashList *Hash, HashPos *At);
First one searches for the Key and updates the HashPos to point at it.
Second one deletes an entry from the hash, entry is pointed to by HashPos
Art Cancro [Fri, 20 Nov 2009 04:12:24 +0000 (04:12 +0000)]
* Adjusted the 'caltoday' CSS to make it a color that doesn't render the text unreadable. Also fixed a stylesheet bug that put today's date number in the middle of the box instead of on top.
Art Cancro [Tue, 17 Nov 2009 17:20:49 +0000 (17:20 +0000)]
* If patch fails, send rejects to /dev/null instead of cluttering /tmp with them.
* Report pclose() failures in serv_wiki.c because they probably indicate that a diff or patch command failed.
Dave West [Mon, 16 Nov 2009 23:08:23 +0000 (23:08 +0000)]
configure will now detect the Boehm-Demers-Weiser garbage collection library
We don't actually use it yet but we will when I add the libsee javascript
engine that recomends it.
We will probably need to add the Boehm-Demers-Weiser library to easyinstall
since it seems only debian based distros have it as a package.
Art Cancro [Sun, 15 Nov 2009 04:41:43 +0000 (04:41 +0000)]
* Added a new category 'fallback smart host'. These are smart hosts that are used only when direct delivery fails. It's just the thing for those sites that have a smart host available but prefer not to use it.
Art Cancro [Sat, 14 Nov 2009 05:16:59 +0000 (05:16 +0000)]
* Switched the SMTP Client back to a simple timer-event hook with a static variable lock. I couldn't figure out why davew's locking system didn't work. The code looks solid, but for some reason, after the first time it hits that 'already running' thread, once that first thread exits it never starts again.
Art Cancro [Fri, 13 Nov 2009 21:33:16 +0000 (21:33 +0000)]
* Trying to figure out why the SMTP Send queue is stuck on Uncensored. I corrected one edge case where it was possible for the thread to exit without unlocking, but I don't think we were hitting that case.
Art Cancro [Fri, 13 Nov 2009 04:12:25 +0000 (04:12 +0000)]
* Renamed the 'wikipage' variable to 'page' in the enter message loop to make it identical to its corresponding variable in the read message loop. This allows the page name to be displayed in the room banner during editing.
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.
* 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 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 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.
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 [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.
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.
* 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
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.
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.