Art Cancro [Wed, 16 Jan 2008 14:42:41 +0000 (14:42 +0000)]
VIEW_ definitions are now in libcitadel.h
Also added a version number check to libcitadel.h and to the
library itself. citserver and webcit will refuse to run if
the linked version of libcitadel is older than the one used
at compile time.
Dave West [Tue, 15 Jan 2008 16:54:31 +0000 (16:54 +0000)]
Alter the webcit shutdown a bit more.
Sending the watcher process a TERM kill the child and exits the watcher
without shutdown.
Sending the watcher a HUP shuts down cleanly.
Dothebart said this was the prefered way to do it.
Dave West [Tue, 15 Jan 2008 14:15:06 +0000 (14:15 +0000)]
Now the autopurger will always attempt to purge users regardless of the
"Default user purge time" but it will not purge users on time if it is
disabled.
This change added so that dead users are removed if need be.
Check this out guys. The changes are simple but lots of possible things
to test with catastrophic results if I got it wrong.
This should mean that users that have been deleted but not purged and
users that want to be deleted get deleted even if the user purge is
turned off.
Only deleteing users based on time is disabled if the user purge is
0.
* openbsd has no -lresolv, its in their libc.
* TODO: can we get rid of AM macros, as we don't require automake in the whole other configure?
* socket.h requires types.h
Dave West [Sun, 13 Jan 2008 16:40:49 +0000 (16:40 +0000)]
do_hosekeeping is now a seperate thread. This releases worker threads
from worrying about mundane tasks.
Some other code regarding experimental select() in threads. Its turned
off at the moment.
Dave West [Thu, 10 Jan 2008 01:10:14 +0000 (01:10 +0000)]
Attempt to fix bug #313.
It fixes the bug but its not 100% matching the scheme, or at least I
don't think so.
This goes a long way to demonstrating I'm no where near as good at this
as Thierry.
Art Cancro [Sun, 6 Jan 2008 05:56:04 +0000 (05:56 +0000)]
WebCit now detects whether the Citadel server has Sieve support
enabled, and refuses to display the Sieve configuration screens if
it is not there. This will hopefully eliminate complaints in the support
forum of 'mailbox filtering does not work' when the actual problem is that
the server doesn't have libsieve linked into it.
* sanitized the decision whether we have one line auth or {+chars}
* test more thoroughly if we're realy logged in
* print citserver version from configure
Art Cancro [Wed, 2 Jan 2008 19:06:39 +0000 (19:06 +0000)]
Prepared some of the authmode stuff for the imminent addition
of a third mode (LDAP without PAM). The mode itself will not
be written until after the next production release of the code.
Changed the use of 0 and 1 constants to AUTHMODE_NATIVE and
AUTHMODE_HOST.
Art Cancro [Tue, 1 Jan 2008 16:19:13 +0000 (16:19 +0000)]
More verbose logging for get_default_icaltimezone() when it
fails to retrieve built in time zones. This is for the purpose
of troubleshooting a bug which has appeared in libical.
Art Cancro [Mon, 31 Dec 2007 05:37:16 +0000 (05:37 +0000)]
* Cleaned up some misc comments
* Re-enabled the verbose logging for ical_dezonify() in an attempt
to figure out what the f**k is going on with timezones all
of a sudden.
Dave West [Sat, 29 Dec 2007 20:10:06 +0000 (20:10 +0000)]
Removed a few unneccesary lock calls to get a small speed up.
Changed the calc for load average. Now for the purposes of load averages
sleeping is the same as running since it means the thread can't do
something else in the mean time.
Started a new worker thread style for experimental purposes turn on by
un-commenting the #define NEW_WORKER at the top of threads.c
Dave West [Sat, 29 Dec 2007 18:43:18 +0000 (18:43 +0000)]
Created a function to close the master sockets. It is intended to call
this earlier in the shutdown thus causing any threads waiting in select
to exit quicker.
Added a big comment about the worker_thread
Dave West [Sun, 23 Dec 2007 14:56:45 +0000 (14:56 +0000)]
Moved all threading code into threads.c
Slight alteration to worker thread startup code.
Altered the order of the shutdown so that we shutdown the modules and
the ports before closing the database. I'm curious about the remaining
locks in the data base after shutdown.
Still to come.
Wrappers for the pthread calls so that they can return to sysdep.c (the
portability file).
Further speed improvements.
Module to get thread data for user display.
Art Cancro [Wed, 12 Dec 2007 03:58:05 +0000 (03:58 +0000)]
Calendar system now handles invitations and rsvp's
using the MIME type 'application/ics' as well as the conventional
'text/calendar'. As a result, it now smoothly interoperates with
systems such as Google Calendar.
* give the flag to the CtdlDoIHavePermissionToPostInThisRoom in through the parameters of validate_recipients.
dict_tcp flags it CHECK_EXISTANCE;
serv_smtp flags it POST_EXTERNAL / POST_LOGGED_IN depending on user state. (logged in users may post to public rooms if they have write permission)
Art Cancro [Sun, 9 Dec 2007 04:31:24 +0000 (04:31 +0000)]
IMAP server: suppress untagged 'EXISTS' and 'EXPUNGE' responses
if the client just transmitted a command containing a literal.
Buggy IMAP implementations choke on this even though it is legal.
This is an attempt to fix Bug #308.
Dave West [Fri, 7 Dec 2007 15:09:20 +0000 (15:09 +0000)]
Hunting a bug in scheduled threads that caused a segflt. Got it and
squished it. We needed to clear next and prev before linking the
scheduled thread onto the running thread list.
Dave West [Thu, 6 Dec 2007 22:44:34 +0000 (22:44 +0000)]
Added the functions to allow scheduling of a thread to start at some
time in the future.
Fixed a bug in garbage collection that caused a corrupted thread list
when unlinking dead threads.
Fixed a bug in context_cleanup, the ContextList needed to be updated on
each pass since a module may try to iterate the list as a result of the
event triggerred here.
Art Cancro [Thu, 6 Dec 2007 05:11:05 +0000 (05:11 +0000)]
Began (but did not complete) implementation
of XEP-0078 - non-SASL authentication for Jabber sessions.
This is a deprecated protocol but some clients (such as
CenterIM) still seem to use it.
Dave West [Wed, 5 Dec 2007 21:03:04 +0000 (21:03 +0000)]
Prevent the creation of new threads if system load climbs at shutdown
time.
Also turn signals back on for threads. For some reason we occasionally
crash on the shutdown but enabling signals in the threads seems to stop
this????? Also ecrash needs the signals turned on.
Dave West [Wed, 5 Dec 2007 20:17:22 +0000 (20:17 +0000)]
Changed the way we do the TSD area.
Now this code is in sysdep.c
Added an element to the TSD to store a pointer to this threads control
structure. This allows a speed up in CtdlThreadSleep(),
CtdlThreadCheckStop() and the odd one or two other places since this
thread no longer needs to search the list of threads to find its own
control ctructure.
Dave West [Tue, 4 Dec 2007 17:10:32 +0000 (17:10 +0000)]
Changed the way we name threads. Now we use a const char *.
CtdlThreadName now takes a const char * and returns a const char *
It is up to the caller to make sure the name never goes out of scope.
* applied Patrick Colemans patch
* patched CtdlDoIHavePermissionToPostInThisRoom to enable anonymous posting to non-aide-only post rooms
* first starts on bug 209 to get more versatile email interfaces.
Dave West [Mon, 3 Dec 2007 22:00:48 +0000 (22:00 +0000)]
Added an entry point to the modules init stuff.
The new entry point is defined by the macro
CTDL_MODULE_UPGRADE(module_name).
This entry point works in much the same way as the init entry point
except it is called before the init entry point. This entry point is
intended for use as its name implies. The module should do any upgrade
stuff it needs to do before it can initialise.
serv_upgrade.c demonstrates the useage.
Art Cancro [Mon, 3 Dec 2007 07:22:43 +0000 (07:22 +0000)]
Only send presence notifications when the first
concurrent session for a user logs in, or when the last
session logs out. Also handle stealth mode semantics.