CVS log for epic5/include/newio.h |
![]() |
Request diff between arbitrary revisions
* Add new level SYSERR (see UPDATES) * Add a server refnum to syserr() to send the syserr to the proper window. * Add a server refnum to new_open() so we can pass it to syserr(). * Add new flag to /XECHO, /XECHO -AS (output to all windows on server) * This should make syserrs go to the "correct window" most of the time (larne)
* Add SEDSHA cipher type, which is better than SED, and always available. * Add my_sleep|isreadable|iswritable() funcs to phase out rogue selects()h * Add support for multiple concurrent servers to /encrypt. yay! * Store the length of the Crypt key within the key itself. * This moves us closer to being able to decrypt arbitrary data. * Test all of the cipher types, incl. compat of CAST with ircII. All set!
* Lay the foundations for nonblocking ssl connection (not supported yet) * Change SEND_LINE to do SCROLL_FORWARD if we're in scrollback mode * Add support for maildir mailboxes. * Fix crash with 042 numeric.
* Add marshalling functions for getaddrinfo() * Use getaddrinfo marshalls + dgets to simulate nonblocking dns lookups. * New newio io type, "NULL" which i'll probably whack later.
* Take a new arg to new_open() to control whether INFO -- errors are output. * Don't output the "INFO --" things for dcc or execs
* Refactor the error stuff by eliminating my_strerror() and dgets_errno. * Error messages are now delivered on multiple levels as info is available. * This may get annoying, but it's a lot more accurate now! * Change inet_* functions to return int's since their retval is unused. * Add a new internal "syserr()" function that generates formatted errors. * Syserr's look like say()s but they act like yell()s. (can hook with /on yell) * Keep an counter in the server stuff so we can count off as addrs are used. * So the error message in /ON DCC_LOST is always just "ERROR" now. * Fix various compiler warnings and stuff. * Add $hookctl(GET HOOK <ref> STRING), return /load'able format of ON * Fix some debugging outbound in switch_hostname(), doh! * Roll set_socket_options() into a new Socket() function. * Roll connections to AF_UNIX sockets into the mainline stuff. * Roll nonblocking/connect/nonblocking into Connect(). * Add AF_UNIX support to Getnameinfo() to remove annoying errors. * When doing recovery from EBADF in select, only check fd's we're using * Just puke if configured for kqueue() and kqueue() fails. * Don't puke on default 353 output if the userlist arg is missing. (for ratbox) * Permit doing /window name to change case of window's name.
* Fix accept() with pthreads. Nonblocking + pthreads == Bad. * Throw away all unused addrs when we are registered, to ensure no reconnects.
* Refactor $sar() and $msar() so they share as much code as possible. * Refactor newio, support select/kqueue/poll (#define's in newio.h) * ... Getting closer to not needing select! * Fix SSL. * Fix a bunch of misc compiler warnings * Remove restrictions on /QUOTE, so there! * Add pthread support to newio for larne. HUZZAH! * I'm sure a zillion things are broken, so it's time to test!
* Add a dgets_buffer() to inject data into dgets() system. * Fix up dgets() so it has read() like semantics. * Fix up dgets() callers to use it like a read() type function. * Turn off /xdebug server_connected hardcoded at startup for now. * Fix up unix_* io functions to use dgets_buffer(). * Fix do_filedesc() to repeatedly call callback until buffer is clean * Move set_socket_options() to network.c, make do_filedesc() global func
PHEAR the breakage! * Major refactoring of newio system: * Change main io() look into a "fill" cycle and a "drain" cycle, using buffers * Change new_open() to take an io policy to perform when fd is "ready" * Use token to determine if an fd is "dirty" or "clean" (is data ready?) * Process accept()s through newio/dgets. * Merge nonblocking connects as just another type of new_open() policy. * Nonblocking connects emit sockaddr info when connected for dgets(). * Change dgets() to not perform io, but just drain from the buffer * Now all data goes through dgets()! huzzah! * Nuke kqueue support for the moment (will come back later) * Hide the "holding" status of a fd inside the IO metadata. * This allows me to support "holding" in other IO models. * Major refactoring of ssl support: * Move all meta-data about ssl in ssl.c in a linked list * As much as possible, have server treat the ssl case as "normal" * Implement all ssl interfaces even in non-ssl case, guard with panics ^^^^ None of the above should be user-visible changes.
* Abstract the reading function out of dgets() via an argument * Add unix_read(), the default reader for dgets() * Add ssl_reader(), a dgets-like reader for SSL connections * Add server_ssl_reader(), a dgets reader for servers using SSL. * I probably broke SSL servers by doing this -- report bugs please!
* Abstract fd handling in newio.[ch] through #defines * Add fd handling with freebsd's kqueue(). Huzzah! (not turned on by default) * Refactor how dgets() works with incomplete SSL reads, slurp up everything * Nix the bletcherous do_server(-1) hack in io(). * Fix a few more bogons in do_server().
* Hide new_select() behind wait_select(), which will hold the result fd_set's * Don't make do_filedesc() take fd_set's, but rather get them from wait_select. * Be cautious and when redrawing one screen, redraw all screens. * Refactor io() some more; no explicit dependancy on select() now * Refactor io(), optimize placement of some of the post-select operations. * When wserv changes size, recalculate windows, and allow io() to redraw it.
* Make new_open[_for_write] take a callback function, stash it in io_rec. * Add handle_filedescs() which takes select() results and calls callbacks * Make io() call handle_filedescs() instead of the four callback functions. * This is the first stage of an extendable callback event looper! huzzah!
* Rename 'dcc()' to 'dcc_cmd()' so we can use dcc as variable
* Garbage collect unused 'irc_path' global variable.
* Add --with-warns to configure to do FreeBSD "WARNS" like compiler checks
* Many hundreds of changes to improve the "quality of code" in epic, including:
* - Treat all literal strings as (const char *) and fix const correctness.
* - Mopping up all remaining const-correctness issues
* - Do not "launder" a (const char *) to a (char *) in string searches, (ala
strchr) but rather return a ssize_t offset value.
* - Particular, MatchingBracket() returns (ssize_t) and not (char *).
* - Eliminate all "shadow" variable names by changing them to something else.
* - Eliminate most function decls that do not include a prototype list.
* - Add prototypes for all extern functions that are missing them.
* - Ensure most function pointers include a prototype list.
* - In term.c, most of those (char *)'s are really (const char *)'s.
* - Explicitly specify 'static' functions as 'static'
* - Ensure every function is either 'static' or has a prototype.
* - Eliminate (unsigned) < (signed) type comparisons.
* Hopefully you should not notice any changes!
Another merge.
* Reorganize param list to dgets() to include a length argument * Add (set|get)_server_line_length(), the maximum size of an irc protocol line. * Convert dgets() callers to the new calling style.
* Add extra slop for logically attributed denormalized display strings * Const-ify a few Timevals, just for good measure. * Don't hardcode use of AF_INET in dcc.c, rather use a global variable for it. * Use "global_family" var to pass hint what socket fam to use. AF_INET for now. * Add extra sanity check just in case window->screen goes NULL in status redraw * Fix several benign compile-time issues. * Reword a few previous entries to fit onto one line.
Yikes. Merged to become consistent with HEAD. Sorry for all the commits, I'll be quiet again soon. :) -wd
Fix all the rest of the compile issues. bleh.
* Remove colon at end of RETURN_MSTR so it is like others. * Unify dgets() and SSL_dgets() * Add a 4th argument to dgets(), an (SSL *) for ssl reads, NULL for normals * Integrate SSL stuff more tightly by removing unecessary #ifdef's * Change 'enable_ssl' to 'try_ssl' to avoid confusion with 'ssl_enabled' * Remove uneccesary members of (Window) * #include "functions.h" in any file implementing built in functions. * panic if ssl op attempted on non-ssl connection. * Don't call functions in RETURN_* macros. (they're evaled twice) * Nuke #ifdef 0'd uses of 'ceiling_of_display'
* Use server_list_size() and not number_of_servers outside of server.c * Use NOSERV and not -1 for "no server" * Use (Timeval) and not (struct timeval) * Fix (get|set)_server_sent_*() et al to take server refnum. * Use parse_server_index() and not my_atol() to parse server refnums * re-indent quotecmd * Rename is_server_connected() to is_server_registered * Make /quote work as long as server is open (not registered) * Use send_to_aserver() when it can avoid setting from_server unecessarily * Change sent_to_server and clear_sent_to_server to (set|get)server_sent(). * Change doing_* to get_server_doing_*. * Use (unsigned short) and not (u_short) * Use (unsigned long) and not (u_long) * Make output_reject_ctcp() take a refnum * Lock a dcc while we are connecting it, just in case. ;-) * Fix /dcc send -p <port> * Store protocol enforcements as (get|set)_server_protocol_state(). * Use (Stat) and not (struct stat) * Rewrite $timerctl() so it works like $logctl() * Rename is_server_connected() to is_server_registered() * Fix an off-by-one error with /FOR ... IN ... * Keep track of both readable and writable fd's with newio stuff. * Convert server_list to an array of pointers * When user /server -delete's, leave a gap, don't change refnums around. * Nix code that handles deleting server refnums. * New function, new_open_for_writing(), for when we do nonblocking connects. * Change new_open() to deregister fd as "writable" * Renovate the notify stuff to take refnums and not just use from_server. * Renovate /WHO, /ISON, /USERHOST to take refnums and not just use from_server. * Make everything that uses server_list[] use get_server() instead. * Make everything capable of dealing with "gaps" in server_list[]. * Use a bunch of macros, to handle with getting and setting server attrs. * Make as much as possible use refnums as params and not from_server. * And a lot of other stuff...
Applied the SSL patch from ay-ar. Details are in README.SSL. This works well at this point, but there may be teething problems.
Initial import into CVS
Initial revision
| CVS Admin |
Powered by ViewCVS 0.9.2 |