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.
Art Cancro [Mon, 3 Dec 2007 02:44:20 +0000 (02:44 +0000)]
* WebCit now clarifies, using a localized message (or at
least it will be localized once the translators catch it) the
error condition which occurs when an administrator attempts to
create a new user from within Citadel while running in host
auth mode.
* Wrapped an ifdef around some calendar code that should be disabled
when libical is not present.
* since we now require a new libical version, remove glitch in availability.
* configure now requires libical-0.30
* webserver shuts down libical, valgrind doesn't mention ical anymore now.
Dave West [Fri, 30 Nov 2007 23:31:56 +0000 (23:31 +0000)]
Removed the PushName and PopName debugging macros that I added. They
cause a boom in the auto purger due to some change in the tsd I think.
Anyway, they've servered their purpose now.
Dave West [Fri, 30 Nov 2007 22:11:40 +0000 (22:11 +0000)]
Now we reduce the number of threads if the load conditions are
low. This way we can be nice to other things that might be running on
the same machine by releasing some resources back to the system.
Dave West [Fri, 30 Nov 2007 21:56:02 +0000 (21:56 +0000)]
Moved the garbage collection and threding init stuff into a seperate
function from main()
Also start the same number of threads that it says in the config.
Dave West [Fri, 30 Nov 2007 19:47:29 +0000 (19:47 +0000)]
Don't queue up all the worker threads waiting for the session table in
dead_session_purge(). If it is locked just get out. If that leaves a
dead session/context or two lying around then no biggie because the next
time through will clean them.