Art Cancro [Thu, 24 Jan 2008 16:43:23 +0000 (16:43 +0000)]
Fixed bug #226. The sample message supplied was
a multipart/mixed that contained nothing except an attached message/rfc822
submessage. This is quite unusual but I suppose it is legal. With no viewable
parts at the top level, webcit assumed that the message was corrupt. Changed the
code so that this is no longer an error condition. Instead of displaying an error
and jumping to the exit point, we now display nothing and jump to the portion of
read_message() that displays attachments and submessages.
Art Cancro [Wed, 23 Jan 2008 17:35:26 +0000 (17:35 +0000)]
Modified ical_dezonify() again. It seems that there
is never a need to free the icaltimezone, as it will always be one
of three things:
1. A built-in timezone (memory belongs to libical)
2. Hardcoded UTC timezone (memory belongs to libical)
3. A supplied timezone from another component (memory belongs to caller)
Removed the call to icaltimezone_free().
Dave West [Sun, 20 Jan 2008 13:52:06 +0000 (13:52 +0000)]
Now when a room is created or deleted this users icon bar is updated
immediately.
Other users will have to wait until their iconbar is refreshed (up to
300 seconds) but since they have no knowledge of when the room was
created/deleted they'll never notice.
Dave West [Sat, 19 Jan 2008 23:53:29 +0000 (23:53 +0000)]
Fix the user purge / delete thing once and for all.
When a user is deleted they are purged from the database immediately
unless they are currently logged in.
This used to rely on the autopurger purging the user at a later date.
Now when the user logs out we check to see if they have been marked for
deletion and if they have purge them immediately.
Art Cancro [Sat, 19 Jan 2008 06:51:26 +0000 (06:51 +0000)]
Aha! Finally found the culprit. Someone (possibly me) at
some point in the past decided to set the TZ environment variable
to UTC if it was empty. This is wrong because an empty TZ causes
libc to discover the timezone by other means. As a result, hosts
that were in other timezones were getting their times changed to
UTC.
* decode subject in the right position; if we decode the full text, we don't get hickups with sections passing the border.
* put in a correct dummy string.
Art Cancro [Thu, 17 Jan 2008 20:29:27 +0000 (20:29 +0000)]
The encoding and decoding tables for Base64 are
no longer calculated at startup. CtdlInitBase64Table() is removed. The tables
are now hardcoded as 'const' arrays. Not only will this eliminate the need to do
a startup calculation, but since it is now const we will get a nice clean segv if
some other code attempts to clobber them.
Art Cancro [Thu, 17 Jan 2008 05:08:46 +0000 (05:08 +0000)]
dtable/etable initialization code in libcitadel was
not complete. CtdlEncodeBase64() still initialized upon each call -- and it was
initializing dtable, not etable, causing dtable to have the wrong data the next time
CtdlDecodeBase64() is called. Fixed. Also noticed that WebCit was not calling the
initialization function at all, so this has probably been broken ever since the move
to libcitadel. Fixed this too.
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.