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
* cdb_decompress_if_necessary(): memset 0 the buffer before accessing it
* cdb_decompress_if_necessary(): don't lean on cdb being big enough to fill our header
* string_append_c(): use another name for buf
* imap_roomname():
* 256 is double ROOMNAMELEN; calculate it here to show the relation in place
* extract_token() gives us -1 or the stringlength, use it instead of doing another strlen a line below
* use safestrncpy()
* do_imap_match():
* while lowercasing run till \0 rather than doing strlen above
* respect the size of the target buffer...
* For-loop: assign pointers here, since we start using them here; use IsEmptyStr all over the place (also some forgotten ones...)
* CtdlClientGetLine(): we don't support Error while SSL I/O; remove it.
* client_readline_sslbuffer() put in Pos from the outside
* client_readline_sslbuffer() rewrite contents with StrBufTCP_read_buffered_line_fast() as sample