Dave West [Thu, 20 Mar 2008 15:39:58 +0000 (15:39 +0000)]
A test fix for the thread cancellation routine.
We only log situations where we would have cancelled a thread, we don't
actually cancel them.
With this code we should not see cancellation requests during normal
running.
Cancelation requests during normal running were due to threads being
asked to stop when load decreased but the idle thread detection aloud a
thread to be asked to stop just as select gave it a task and made it not
idle.
Now if select gives a thread a job to do and the thread was asked to
stop during the select the thread changes its state back to running and
refuses the stop request. This only happens if the system is NOT
shutting down.
Art Cancro [Wed, 19 Mar 2008 19:28:48 +0000 (19:28 +0000)]
EVT_LOGOUT hooks are now called with the thread's current
CitContext set to that of the session being logged out, even when
killing a session administratively. This allows the identity of the
user to be passed along to module hooks. This fixes the problem in
the Jabber server where buddy 'ghosts' whould remain visible to
clients if the user disconnected without logging off.
Dave West [Tue, 18 Mar 2008 23:28:55 +0000 (23:28 +0000)]
When doing shutdown we allow each thread up to 5 seconds to exit on its
own after asking it nicely to do so. After 5 seconds we will cancel()
the thread. Its possible that we may loose messages in this manner
since its similar to a SIGTERM. Because of this we write messages to the
log about this event. If we are seeing these entries in the log we need
to track down why the thread is strugling to exit and fix it.
Dave West [Tue, 18 Mar 2008 19:58:41 +0000 (19:58 +0000)]
Ignet now makes use of CtdlThreadCheckStop() to check if it should exit.
This should improve shutdown times.
Still need to be able to interrupt the syscalls for a full solution.
Art Cancro [Tue, 18 Mar 2008 19:15:08 +0000 (19:15 +0000)]
libical, expat, and libsieve are now *required*.
If any are missing, configure will abort, telling the user what is missing and
pointing them to the relevant page on our web site.
Dave West [Mon, 17 Mar 2008 23:35:42 +0000 (23:35 +0000)]
Re-ordered the sequence of checking email addresses against valid system
addresses. This allows us to have a GAB entry for rooms and allows
messages originating internally to be addressed to a room.
For the GAB lookup to work as expected the email address for the room
must be simply room_roomname without the @domain. If the domain part is
included the aliasing routines will translate it into the address of the
person who created the GAB entry.
This should fix bug #324.
Art Cancro [Mon, 17 Mar 2008 15:11:49 +0000 (15:11 +0000)]
When dumping or scanning the wholist in the Jabber
service, only pay attention to sessions that have users logged
in. Doing otherwise exposes empty JID's that cause clients to
malfunction.
* abstract #ifdef HAVE_ICONV around utf8ify_rfc822_string to one place as they started spreadding all over the place
* de-QP email-attachment filenames
* put icon/mime logic into the attachment list
* if we have an application/octet-stream, try to guess the mime for the icon by its extension
Art Cancro [Wed, 5 Mar 2008 04:14:14 +0000 (04:14 +0000)]
Backed out changes in r6088 of addressbook_popup.c
The list may have been nicely sorted, but selecting addresses from the list
causes the names to have escaped HTML characters in them.
* prefer the actual session id
* configure now will find iconv and friends in non-libc situations if its present in the LDFLAGS provided directories (i.e. -L /usr/local/lib/)
* make server_getln return the number of bytes it read
* sort Phonebook popup alphabeticaly
* sort Olson-Timezones alphabeticaly
* sort Who Is Online views first by Idle/Active then alphabetical
* move wholist_section summary.c -> who.c so we can easily use the above algorithms
* documented hashlist
* the user may now sort the array in his prefered way.
(this will mark the array tainted, and increase search times)
* several sort funcions:
* sort by the Hash-String
* sort by the Hashkey (untaints the array)
* sort by a user definable Comparator Function
* don't double libcitadel header function for safestrncpy in webcit.h
* instead of dumb pointing to 255, search backwards from the copied amount of chars.
* safestrncpy counts the copied string anyway, and nobody needs the returned pointer
-> return a long
-> return the number of copied bytes.
-> return negative values if we hit the boundary.
Art Cancro [Wed, 27 Feb 2008 21:45:37 +0000 (21:45 +0000)]
When clicking on a contact's email address to send
them mail, put the display name inside quotes. This escapes any commas
which may be present. Resolves bug 271.
* sample aproach to use the citadel commandline client html renderer to create a plaintext part for multipart alternative mails.
this is considered to be more polite to text users.
* use default configure options to find threadsafe locale
* if we don't have uselocale, opt out all functions / structs related to it.
* if LDFLAGS have: -lgettextlib -lgettextpo -lgettextsrc -liconv -lintl this detection seems to work
* collect sender / read / unread information for calendar items
* dislpay the sender in the bubbles
* set the event Class depending on read / unread state
* added some css classes to view this information
* add icon directory
* increment libcitadel required version
* modified hash debug printf; so we need to modify uses.
* display icons using our brand new mime to icon lookup facility
* fixed several crash / invalid data cases in the hash implementation
* add mimetype to icon facility
* fix some warnings in the deb-build
* bumped version no
* re-designed loop with strlen inside
* if validate_recipients hits bonus-blanks, ignore them.
* use snprintf even if we are shure our buffer is big enough.
Art Cancro [Sun, 17 Feb 2008 05:26:53 +0000 (05:26 +0000)]
Removed a temporary hack to vlprintf() that displayed the
address of the currently bound CitContext. Updated the
internal version number to 7.32 because we are going to have
to push an emergency update.
Art Cancro [Sun, 17 Feb 2008 04:56:49 +0000 (04:56 +0000)]
The auto-purger has its own thread so it needs its own
CitContext. Sharing the masterCC with housekeeping threads could be
causing data corruption issues.
Dave West [Wed, 13 Feb 2008 22:47:42 +0000 (22:47 +0000)]
When using host auth mode the user is given a default email address
based on the gecos field from the passwd file which is usually
"firstname_lastname" this results in the user not being able to receive
mail to their default username address.
To rememdy this when the user logs in for the first time we now create
the users vCard as normal and then add an alias to the vCard.
The alias is username@domain as opposed to firstname_lastname@domain.
We only add the alias if it would differ from the original address.
We only do this in host auth mode.
Dave West [Wed, 13 Feb 2008 19:04:57 +0000 (19:04 +0000)]
We are unable to purge users that have no name but the auto purger seems
to be finding some.
Altered the code so that we do not create a Users Purged message if we
try to purge a user with no name.
Instead we create a User Corrupt message containing the user number of
every user with no name.
These users shouldn't exist so we need to find out where they are coming
from.
Art Cancro [Wed, 13 Feb 2008 15:25:29 +0000 (15:25 +0000)]
Removed the 'defrag databases' stub function and command
line option from the citserver. This is a vestige of
the GDBM days and we're never going back there.