Wilfried Göesgens [Wed, 9 Jun 2010 22:37:37 +0000 (22:37 +0000)]
* add thread local contexts here too.
Wilfried Göesgens [Wed, 9 Jun 2010 22:08:57 +0000 (22:08 +0000)]
* add comment sugested by danboid. users in the situation to use this need guidance.
Art Cancro [Wed, 9 Jun 2010 21:19:51 +0000 (21:19 +0000)]
* Removed a bunch of IE-isms no longer required now that we support IE 6.
* Determined that the non-scrolling banner was implemented using a method that only works in Firefox. Removed it. Now it's equally broken in all browsers. I'll implement a fix and commit that next.
Art Cancro [Wed, 9 Jun 2010 21:02:40 +0000 (21:02 +0000)]
* Merged the 'banner' and 'room_banner' classes. There is no reason for them to be separate.
Wilfried Göesgens [Tue, 8 Jun 2010 21:28:42 +0000 (21:28 +0000)]
* check for syscall.h
* use SYS_gettid to retrieve our LWPID when running in linux; this way we can find out whats loading top
* don't use masterCC's logbuffer
Art Cancro [Tue, 8 Jun 2010 17:57:24 +0000 (17:57 +0000)]
* Make the class names different from the div id's
Wilfried Göesgens [Mon, 7 Jun 2010 22:38:58 +0000 (22:38 +0000)]
* checkpoint thread needs to free its stuff too.
Wilfried Göesgens [Mon, 7 Jun 2010 22:06:50 +0000 (22:06 +0000)]
* move initialization of context to the top
* clean up context on exit
Wilfried Göesgens [Mon, 7 Jun 2010 21:08:46 +0000 (21:08 +0000)]
* by counting up threads starting at 3, we seem to get what top shows in the LWPID when pressing H.
why isn't there always a ct?
Wilfried Göesgens [Thu, 3 Jun 2010 22:46:40 +0000 (22:46 +0000)]
* add function to cleanly shutdown server threads
Wilfried Göesgens [Thu, 3 Jun 2010 16:54:25 +0000 (16:54 +0000)]
* vCtdlLogPrintf(): add the userID when reporting from a system thread
* use StrBuf if available
* CtdlFillSystemContext(); we need to fill context->curr_user too, else we will loose the user during for example room processing.
Art Cancro [Thu, 3 Jun 2010 15:55:24 +0000 (15:55 +0000)]
* Simplified tcp_connectsock()
Wilfried Göesgens [Thu, 3 Jun 2010 13:05:11 +0000 (13:05 +0000)]
* begin_session(): output the type of session and the UID if we know it.
Art Cancro [Thu, 3 Jun 2010 04:51:44 +0000 (04:51 +0000)]
* Removed the extra debug messages. I am about to give up on this problem. Look for today's date [2010jun03] in serv_func.c to see the point in the code where the connection to Citadel is lost. I don't know why.
Art Cancro [Wed, 2 Jun 2010 16:54:28 +0000 (16:54 +0000)]
* More logging. Also display an error to the user if we get a citserver greeting other than 200 or 571.
Art Cancro [Wed, 2 Jun 2010 16:30:25 +0000 (16:30 +0000)]
* more error logging
Wilfried Göesgens [Tue, 1 Jun 2010 22:35:53 +0000 (22:35 +0000)]
* post_message(): QP encode TO/CC/BCC if necessary
Wilfried Göesgens [Tue, 1 Jun 2010 22:27:02 +0000 (22:27 +0000)]
* 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
Wilfried Göesgens [Tue, 1 Jun 2010 20:57:18 +0000 (20:57 +0000)]
* get_serv_info(): evaluate server replies
Art Cancro [Tue, 1 Jun 2010 03:06:22 +0000 (03:06 +0000)]
* fixed a spelling error
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 [Tue, 25 May 2010 15:09:59 +0000 (15:09 +0000)]
* Fixed the off-by-one error in bbs view that causes a blank page to appear at the end when the number of messages is divisible by 20.
Art Cancro [Tue, 25 May 2010 04:05:05 +0000 (04:05 +0000)]
* added some missing license declarations
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.
Wilfried Göesgens [Sat, 22 May 2010 10:10:11 +0000 (10:10 +0000)]
* NeedNewBuf() as CLANG indicates, this parameter should have a name
* several more corrections advised by CLANG
Wilfried Göesgens [Sat, 22 May 2010 09:47:14 +0000 (09:47 +0000)]
* receive_spool(): remove debugging output; just open tempfile if there is anything to read
Wilfried Göesgens [Fri, 21 May 2010 22:38:09 +0000 (22:38 +0000)]
* CtdlTryPassword(): fix leak
Wilfried Göesgens [Fri, 21 May 2010 20:22:51 +0000 (20:22 +0000)]
* add possibility to specify the inbound buffer size
* XMPP: increase our buffer on start, so client_read_random_blob() can unveil all its power.
Wilfried Göesgens [Fri, 21 May 2010 20:21:27 +0000 (20:21 +0000)]
* ReAdjustEmptyBuf() wasn't quiet what it should be: increase the buffer to a specified size
Wilfried Göesgens [Fri, 21 May 2010 19:25:42 +0000 (19:25 +0000)]
* StrBufReadBLOBBuffered(): tell read to give us as much as our buffer can bear, not as much as we want to read
Wilfried Göesgens [Fri, 21 May 2010 17:50:06 +0000 (17:50 +0000)]
* sock_read_to(), sock_getln() flush the Migrate buffer before useage, just to be shure.
Wilfried Göesgens [Fri, 21 May 2010 17:48:50 +0000 (17:48 +0000)]
* cmd_ucls(): don't overwrite the upload type before we use it
Art Cancro [Fri, 21 May 2010 17:35:13 +0000 (17:35 +0000)]
* trace messages
Art Cancro [Fri, 21 May 2010 16:32:48 +0000 (16:32 +0000)]
* Better tempfilename generation for receive_spool()
Art Cancro [Fri, 21 May 2010 15:19:52 +0000 (15:19 +0000)]
* Remove color from log message
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:56:13 +0000 (17:56 +0000)]
* removed an extraneous debug line
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.
Art Cancro [Wed, 19 May 2010 15:49:45 +0000 (15:49 +0000)]
* individual spool files are now created for each run of the networker and consolidated later.
Art Cancro [Wed, 19 May 2010 14:09:20 +0000 (14:09 +0000)]
* When downloading network spool from another node, use the new network/spooltmp architecture
Wilfried Göesgens [Tue, 18 May 2010 23:06:21 +0000 (23:06 +0000)]
* same as for citserver: move INLINE functions from .c to .h and make them static INLINE; thanks again to #llvm, jyasskin and sabre
Wilfried Göesgens [Tue, 18 May 2010 22:52:46 +0000 (22:52 +0000)]
* 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
Wilfried Göesgens [Tue, 18 May 2010 21:34:56 +0000 (21:34 +0000)]
* 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 [Mon, 17 May 2010 17:34:10 +0000 (17:34 +0000)]
* Minor cleanups while I try to figure out the network problem
Wilfried Göesgens [Sun, 16 May 2010 20:49:51 +0000 (20:49 +0000)]
* roomchat_rwho(), roomchat_poll(): gcc likes bit operations in logical operations better that way.
Wilfried Göesgens [Fri, 14 May 2010 17:52:32 +0000 (17:52 +0000)]
* check_get() clang was indeed right, this ';' is a bug. dict_tcp syntax errors would have been ignored.
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.
Wilfried Göesgens [Tue, 11 May 2010 22:05:57 +0000 (22:05 +0000)]
* openid-Module: don't use static buffers in most places
Wilfried Göesgens [Tue, 11 May 2010 22:04:15 +0000 (22:04 +0000)]
* cdb_fetch() make lookup key const
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 [Fri, 7 May 2010 21:53:11 +0000 (21:53 +0000)]
* Modified the XMPP service to use client_read_random_blob(). However, I noticed that client_read_random_blob() is always returning only one byte.
Wilfried Göesgens [Thu, 6 May 2010 21:36:35 +0000 (21:36 +0000)]
* implement client_read_random_blob(); its hear to read a blob of undefined size; Its to be used _once_ after a successfull select of the master loop.
Art Cancro [Thu, 6 May 2010 21:05:32 +0000 (21:05 +0000)]
* cleanup
Wilfried Göesgens [Thu, 6 May 2010 18:43:10 +0000 (18:43 +0000)]
* StrBufPlain(): don't access pointers before we check them
Wilfried Göesgens [Thu, 6 May 2010 18:40:08 +0000 (18:40 +0000)]
* OverrideRequest(): for some reason Hdr->HR.ReqLine can be NULL here, we need to take care of that.
Art Cancro [Wed, 5 May 2010 16:14:01 +0000 (16:14 +0000)]
* XMPP login hooks which output protocol data should only activate if this is actually an XMPP session. Ouch.
Art Cancro [Wed, 5 May 2010 16:02:06 +0000 (16:02 +0000)]
* check for null
Wilfried Göesgens [Tue, 4 May 2010 20:32:49 +0000 (20:32 +0000)]
* StrBufReadBLOBBuffered(): fix abort condition; if it doesn't end by itself, stop after 100000 tries; if we select 1000 tries should do it.
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.
Wilfried Göesgens [Mon, 3 May 2010 21:16:31 +0000 (21:16 +0000)]
* rather have one typedef than dozends of structs all over the source
Art Cancro [Mon, 3 May 2010 20:09:50 +0000 (20:09 +0000)]
* Lots of changes to the XMPP Mortuary to make it keep track of useful data. We're one more update away from this being something that works.
Art Cancro [Mon, 3 May 2010 16:41:45 +0000 (16:41 +0000)]
* Eliminate generic_free_handler() since it is not needed
Art Cancro [Mon, 3 May 2010 15:31:33 +0000 (15:31 +0000)]
* cosmetic changes
Art Cancro [Mon, 3 May 2010 04:24:29 +0000 (04:24 +0000)]
* Tried to complete the dead buddy thing in xmpp, but the code I already wrote now seems to be broken?
Wilfried Göesgens [Thu, 29 Apr 2010 22:32:32 +0000 (22:32 +0000)]
* Make memreadlinelen() const
Wilfried Göesgens [Thu, 29 Apr 2010 22:12:06 +0000 (22:12 +0000)]
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.
Wilfried Göesgens [Thu, 29 Apr 2010 21:15:41 +0000 (21:15 +0000)]
* free the wildfire buffer on session detaching
Wilfried Göesgens [Thu, 29 Apr 2010 21:07:21 +0000 (21:07 +0000)]
* require DEF:VAL and DEF:STR to have one token, as it should.
Wilfried Göesgens [Thu, 29 Apr 2010 21:02:11 +0000 (21:02 +0000)]
* ups, its FreeStrBuf(&ptr)
Wilfried Göesgens [Thu, 29 Apr 2010 20:57:19 +0000 (20:57 +0000)]
* fix wildfire exception handling; collect stuff in a buffer, and serialize it to the header when done.
Wilfried Göesgens [Thu, 29 Apr 2010 18:49:10 +0000 (18:49 +0000)]
* xmpp_xml_end(): output what we don't understand in the error message.
Art Cancro [Wed, 28 Apr 2010 17:03:55 +0000 (17:03 +0000)]
* Reenabled the XMPP mortuary. If there's still a bug in this I need to find it.
Art Cancro [Wed, 28 Apr 2010 16:01:22 +0000 (16:01 +0000)]
* A little more padding between the chat windows
Art Cancro [Wed, 28 Apr 2010 15:52:26 +0000 (15:52 +0000)]
* Added a background color to the roomchat send box
* fixed some indentation and spacing in webcit.css
Art Cancro [Tue, 27 Apr 2010 16:23:06 +0000 (16:23 +0000)]
* upgrade prototype to 1.6.1
* upgrade scriptaculous to 1.8.3
Art Cancro [Tue, 27 Apr 2010 16:20:19 +0000 (16:20 +0000)]
* When the user navigates away from the roomchat screen for any reason, advise the server of this condition using an 'RCHT exit' command.
Wilfried Göesgens [Mon, 26 Apr 2010 23:05:50 +0000 (23:05 +0000)]
* StrBufTCP_read_buffered_line_fast(): silence warning of narrow minded compilers
Wilfried Göesgens [Mon, 26 Apr 2010 22:22:37 +0000 (22:22 +0000)]
* output_html(): it needs to be isspace()src="cid: not <blank>src="cid:
Wilfried Göesgens [Mon, 26 Apr 2010 21:32:31 +0000 (21:32 +0000)]
* cmd_spex() accept old (deprecated) version of policy too
* cmd_gpex() accept old (deprecated) version of policy too
Art Cancro [Mon, 26 Apr 2010 18:48:24 +0000 (18:48 +0000)]
* More tweaks to the room chat window. Now displays the list of users in chat.
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.
Art Cancro [Sun, 25 Apr 2010 05:11:29 +0000 (05:11 +0000)]
* Added some style to the roomchat window.
Wilfried Göesgens [Sat, 24 Apr 2010 13:31:29 +0000 (13:31 +0000)]
* 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
Wilfried Göesgens [Sat, 24 Apr 2010 12:49:16 +0000 (12:49 +0000)]
* 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
Wilfried Göesgens [Sat, 24 Apr 2010 11:41:33 +0000 (11:41 +0000)]
* offer a split version of GetNextHashPos(): GetHashPos() retrieves the item, NextHashPos() moves the iterator forward.
Wilfried Göesgens [Sat, 24 Apr 2010 10:20:42 +0000 (10:20 +0000)]
* post_mime_to_server(): next try for the lz3 case: try to block posting empty messages anyway.
Wilfried Göesgens [Sat, 24 Apr 2010 09:33:15 +0000 (09:33 +0000)]
* 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...)
Art Cancro [Sat, 24 Apr 2010 05:04:20 +0000 (05:04 +0000)]
* Finally got room chat working properly. Just need to add the bells and whistles.
Wilfried Göesgens [Thu, 22 Apr 2010 19:56:41 +0000 (19:56 +0000)]
* call json_roomflr with sort parameters
Wilfried Göesgens [Wed, 21 Apr 2010 22:42:11 +0000 (22:42 +0000)]
* ParseMessageListHeaders_Detail(): don't use the tokenizer to read the subject; this works around pipes in mail subjects
Wilfried Göesgens [Wed, 21 Apr 2010 22:08:16 +0000 (22:08 +0000)]
* headers_euid() ooops, 'T' is a string!
Wilfried Göesgens [Wed, 21 Apr 2010 22:00:59 +0000 (22:00 +0000)]
* cmd_oidf(): if we don't have ha Server to authenticate against, bail with ILLEGAL_VALUE
Wilfried Göesgens [Wed, 21 Apr 2010 19:52:03 +0000 (19:52 +0000)]
* fix flags for state of rest parsing
* DAV-Message-list: expect timestamp next to the EUID
Wilfried Göesgens [Wed, 21 Apr 2010 19:20:31 +0000 (19:20 +0000)]
* headers_euid(): print out timestamp of message too, DAV needs this.
* CtdlOutputPreLoadedMsg(): initialize pointer to silence value