* add StrBufSanitizeEmailRecipientVector(); it will qp encode plain names with utf-8 chars etc.
* add CheckEncode() which scans for umlauts, whether qp encoding is neccesary
* add tests
Art Cancro [Tue, 25 May 2010 18:08:48 +0000 (18:08 +0000)]
* Now attempting to fix the final few rendering problems in Internet Explorer. Testing with IE 7. I will also test with IE 8, Firefox, and WebKit (Chrome, Safari etc). IE 6 will not be tested; in fact, I am *removing* all markup which indicates that it is only present to work around IE 6 bugs.
Art Cancro [Mon, 24 May 2010 17:31:47 +0000 (17:31 +0000)]
* WebCit thread pool is no longer tied to the number of server sessions. MIN_WORKER_THREADS is also gone. We now start with one worker thread. The only condition which causes new worker threads to be spawned is when all threads are executing and none are blocking on accept(). Initially this happens rather quickly, until the ideal thread pool size is found.
Art Cancro [Fri, 21 May 2010 14:53:58 +0000 (14:53 +0000)]
* Change to main server loop. All threads block on accept() instead of using a mutex. Hopefully this will solve the deadlock issue that has been plaguing us.
Art Cancro [Thu, 20 May 2010 17:54:51 +0000 (17:54 +0000)]
* In a rare eureka-moment, discovered that my XML string escape function was only sanitizing characters higher than 0x7F, but the problem character in my data set was 0x01. Fixed.
Art Cancro [Wed, 19 May 2010 15:52:06 +0000 (15:52 +0000)]
* Finally eliminated the dreaded 'spooling - try again in a few minutes' error, since the generation of spool files is no longer in the same locking domain as their transfer.
* INLINE doesn't work across several objects as of C99; we just survive it the way its now because of gcc is sluggish here.
(see http://clang.llvm.org/docs/UsersManual.html#c_modes for details)
Move the INLINE function into the header, make it static INLINE as sugested by jyasskin and sabre
* split cutuserkey() out of makeuserkey(); its name doesn't show that theres a modification of the buffer inside.
* modify several functions so their callers have to call cutuserkey()
* harmonize the user length to USERNAME_SIZE; apply cutting after cleanup of invalid characters
Art Cancro [Tue, 18 May 2010 19:16:52 +0000 (19:16 +0000)]
* When a network node is uploading a spool file, receive it in ./network/spooltmp and then move it to ./network/spoolin only when the upload is closed. (This is the first of perhaps five changes which need to be made.)
Art Cancro [Tue, 18 May 2010 18:51:49 +0000 (18:51 +0000)]
* Documented all of the 'TODO: document me.' commands in file_ops.c
* Set up a new directory ./network/spooltmp, this will be part of the solution to allow the processing of network spool files to occur independently of the transfer of network spool files.
Art Cancro [Fri, 14 May 2010 15:24:26 +0000 (15:24 +0000)]
* Properly escape XML output using new xmlesc() function for XMPP sessions. This function should eventually get moved into libcitadel, but the bigger problem is that it doesn't handle UTF-8. Right now we're just using it to keep Pidgin from barfing on illegal characters.
Art Cancro [Mon, 10 May 2010 21:22:05 +0000 (21:22 +0000)]
* I think this cleans up the remaining XMPP bugs. We now see the correct number of sessions for each user (and it turns out I didn't have to modify the xmpp_is_visible() API after all, but it's still a nice enhancement to have and doesn't cost extra).
Art Cancro [Mon, 10 May 2010 21:06:42 +0000 (21:06 +0000)]
* Ok, it's not an async bug. When I changed everything over to xmpp_is_visible() I screwed up the logic of xmpp_presence_notify(). Changed the xmpp_is_visible() API to allow it to check the visibility of ANY session to ANY other session. Still need to clean up xmpp_presence_notify() and nail down the bug.
Art Cancro [Mon, 10 May 2010 20:36:54 +0000 (20:36 +0000)]
* Changed the logic of how we inform the client about dead buddies. Instead of pushing a dead buddy update at login, we push it immediately following any roster query requested by the client. I discovered that some clients don't bother to query the roster if an unsolicited update is recived. This is working more reliably now. However, I'm not getting any asynchronous updates; must check this...
Art Cancro [Mon, 3 May 2010 21:19:15 +0000 (21:19 +0000)]
* New utility function xmpp_is_visible(), used to determine whether any given session in the wholist is visible to the current user and capable of receiving instant messages. This eliminates duplicate code in three different places.
* The XMPP mortuary is functionally complete and does appear to be working properly. Upon connecting, an XMPP client now receives 'buddy delete' messages for any buddy he has ever seen, minus the ones who are online right now. This should effectively eliminate the accumulation of 'ghost' buddies on large public access systems like Uncensored.
Art Cancro [Mon, 3 May 2010 21:18:37 +0000 (21:18 +0000)]
* New utility function xmpp_is_visible(), used to determine whether any given session in the wholist is visible to the current user and capable of receiving instant messages. This eliminates duplicate code in three different places.
* The XMPP mortuary is functionally complete and does appear to be working properly. Upon connecting, an XMPP client now receives 'buddy delete' messages for any buddy he has ever seen, minus the ones who are online right now. This should effectively eliminate the accumulation of 'ghost' buddies on large public access systems like Uncensored.
xmpp_fetch_mortuary_backend(): copy the string over so we can use it later and free it. else we will free a non-malloced pointer or loose that buffer before we want to use it.
Btw, theres no need for specifying generic_free_handler, thats default.
Art Cancro [Mon, 26 Apr 2010 16:20:53 +0000 (16:20 +0000)]
* Executive decision. From now on, intr (ctrl-c) begins an attempt at a graceful shutdown, but quit (ctrl-backslash) forcibly quits the server. Signal handler for SIGQUIT has been disabled.
* add Remove button
* post_message(): use IKEY and Flathash, we just use numbers anyway.
* post_message(): add handler for removal of attachments; it seems as if 'filename' comes out URL-encoded, so we need to decode it.
We need to iterate and strcmp() so we find the right one :(
* post_message(): when adding a new item just using count+1 isn't sufficient anymore; we need to use the key value + 1 of the last item in the list instead
* DeleteEntryFromHash(): don't skip indirection via the lookuptable, else we free some random payload
* DeleteEntryFromHash(): NULL the end of the list; This is the entry we just removed.
* hashlist_test: add some tests with removing items from the list
* move policy.c into modules/expire/expire_policy.c, since it just controls this.
* remove all unneded includes to policy.h
* remove hardcoded reference to policy from mk_module_init.sh (hard to find...)
* add one more callback hook to the webcit DAV handler structure; this will be used to revalidate URLs, move or delete certain items referenced by URLs
* add handler vor EUID based namespaces; so far we just have the exists logic; this will be filled with the other required operations soon.
* finish REST URL parsing with 'best-guess'-room logic
* ReadPostData(): abort if we fail to read the whole content
* session_loop(): allocate buffers after reading post data, so we don't have to free them on error
* session_loop(): abort if reading post data fails
* change_start_page(), LoadStartpage(): check whether the startpage is allowed by rule
* InitModule_MSG() disallow postpart_download, postpart, confirm_move_msg, delete_msg, move_msg, post to become the startpage; they don't do usefull things there.
Art Cancro [Thu, 8 Apr 2010 04:33:45 +0000 (04:33 +0000)]
* Moved instant messaging into its own module -- serv_instmsg
* Removed serv_chat and the CHAT command
* Implemented serv_roomchat and the RCHT command, which implements a brand new chat protocol
* GetRESTFolder(): find the parts of the URL matching our rooms; since there may be uids/messageids/mimeparts keep a 'best guess' we return if theres no direct match
* GetRESTFolder(): collect sub-rooms of the current URL so we can list them later