CVS log for epic5/source/network.c |
![]() |
Request diff between arbitrary revisions
* Phase two of larne's patch is to isolate features that require job control * You can #define NO_JOB_CONTROL to turn off fork/exec type stuff. * Soon, the configure script will auto-grok this.
* Roll in a bunch of changes from larne to make epic5 more vms-friendly * Rename if.h -> ifcmd.h (larne) -- Make sure you rerun configure! * Run make depend to pick up name change of if.h * Check for <sys/param.h> in configure (larne) * Extern funcs are case insensitive in strict c90, fix (larne) * Rename options -> options.h since vms requires a dot in filename (larne) * Change "readonly" -> "rdonly" since "readonly" is a symbol in vms. (larne) * Pull in "compat.h" for gailib.c and glob.c (larne) * Set stdout to be explciitly line buffered at startup (larne) * Returning a value from void functino forbidden by strict c90. fix (larne) * Fix some compiler warnings that were lying around. * There are more changes forthcoming, these were the easy ones.
* Fix missing NULL for $hookctl(list ...) [rb howl] * Fix various other issues that valgrind found (yay!)
* 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 a new field to server descriptions, 'vhost' to allow you to specify a per-server virtual host. All the usual caveats apply.
* Support AI_ADDRCONFIG in our builtin AI_MASK/getaddrinfo(). * Make set[_non]_blocking extern. * Support NEWIO_SSL_CONNECT as a new_open() type. * Add a new ssl_connect() io callback function for NEWIO_SSL_CONNECT. * New scripts from weirdo: autojoin, autoquery, floodprot, renumber * New version of reconnect script from weirdo. * GC the fixed-alist support (last used by /quote and protocol handler) * Reorg server SSL negotation stuff to be nonblocking. yay! * Comment all sorts of stuff in ssl.c.
* Check for <ndbm.h> in configure, don't do DBM if it is absent. * $dbmctl() always no-ops, returns empty string if dbm not available. * Add 'd' to $info(o) if DBM support is included * Add a check for solaris cc, moxy up the CFLAGS for larne. * Fix compile breakage if both tparm() and base64() are missing. doh. * Fail when maximum number of levels have been added. * Note a few places the window refnum is changed.
* Include <stddef.h> if we can, for no particular reason... * Nix now unused mangle_line(). yay! * Use (intptr_t) instead of (intmax_t) to treat pointers as integers... * Try to handle failures from the dns helpers with more grace.
Fix alignment issues on sparc. Thanks to crapple for his help!
Round 1 of an attempt to support 64 bit ints without breaking the build for systems with only 32 bit ints (ie, vms). I will phase in support for c99's "intmax_t" and hacks for backwards compatability "soon".
Fix for a server connect bug as per KNOWNBUGS.
Add humanize_number() and fix compiler warnings. more to follow!
Fix a raging bogon in marshall_getaddrinfo. How did this _ever_ work? GAH! D'oh! and other exclamations of angst!
* Implement $windowctl(SET .. NOTIFY_NAME) for howl. * Fix a few things with the dns helper. * In /on type '<pattern>', Set $* so <pattern> can match against itself.
New builtins, very preliminary support for nonblocking dns.
* 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.
New internal function "marshall_getaddrinfo" which re-constitutes the linked list return value of getaddrinfo() into a single buffer which we can thus new_free() later. This will be forming the basis of any async dns lookups, because a full getaddrinfo() return value can be passed as 1 block of data.
No functional changes in this commit, just some source cleanup before I go through and wrangle the screen recalculation code into submission.
* Make /bind "compress" string, and bind and print it compressed. * This fixes /bind'ing literal characters being displayed literally. * Round 3 of blackjac's builtins script * Round 1 of fudd's loadformats script. * Fix some "all-the-world's-an-int" bugs reported by xlc (aix's compiler).
* Change "ERROR --" to "INFO --" to not alarm people as much. * Change a few other warnings to not be so alarming. * Change new_realloc() to not move ptr if it is big enough to hold new size. * Fix all the status_* sub-formats to not have any hardcoded size limits.
* Add --with-multiplex=[select|poll|kqueue|pthread] to configure
* Check thread-safety of SSL in configure when using pthreads.
* Don't unconditionally skip leading :'s in symbol names.
* When calling functions, handle skipping leading :'s specially.
* Add support for pthread locking for ssl to ssl.c
* Add %{2}+ and %{3}+ status expandos that only show the mode string.
* Use AI_ADDRCONFIG flag to tell getaddrinfo() we only want addrs we can use.
Are new accept()ed sockets with pthreads really nonblocking?
* 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.
* 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
* Fix compile bugs for non-ipv6 users with the dual-vhost stuff. * Fix null deref with /window flush when not in hold mode.
* Hide ArgListT in alias.h to only those who need it, to save numbers.c * Fix up a lot of compile warnings all over the place. * Some changes to $hookctl() might need feedback from howl... * Fix vhost support so we can do inbound sockets again.
* After connect()ing to a server, save the remote peername * This fixes $serverctl(GET <num> PORT) * This also fixes $servports(), which should work as (not) documented. * Fix for notify_signon default handler, from larne. thanks! * Add $serverctl(GET <num> ADDRFAMILY), returns "ipv4", "ipv6" or "unix" * Allow /hostname <ipv4>/<ipv6>, separately set v4/v6 vhosts! (see UPDATES)
* Move Lastlog definition to lastlog.c, leave stub behind for window.h * Add window_all_channels(), return all windows for channel from names.c * Change boolean vartype for windows and status: int -> short. * Add do_short_boolean(), like do_boolean(), but it takes a short. * Make the default server quit message "Leaving" * Have /window describe show all the channels in a window. * Have /window describe show nicks, channels in flat list, not one per line. * Make sure to use the server's default quit message when closing it. * Create a prototype of atoll() for compat systems.
GC the blocking connect() code, epic is now fully nonblocking connect!
* Fix some compiler issues and so forth * Nix the NOTE level. * Move load_ircrc() to irc.c, nix "startup_file" global var. * Always change server state using set_server_status(), because... * Add /ON SERVER_STATUS, $0 is refnum, $1 is old state, $2 is new state * Delete /on widelist, no longer used * Prototype mode string manipulation functions * Reorganize names.h to reflect new realities * Prototype (Get|Free)addrinfo() now that server.c uses them. * Nix /window bind, rebind, unbound; $windowctl(* BIND_CHANNEL *)
* Allow client_connect() to be nonblocking * Allow Getaddrinfo() and Freeaddrinfo() to be called extern. * Track writable sockets in 'global_max_fd' too. * Keep a list of AI's for server addresses in the server code * When server connection lost before registration, use the next AI * Implement set_server_status(), which controls where server is in lifetime * Nix reconnect(), which is replaced by close_server + set_server_status(). * Nix server_reconnects_to(), we no longer reconnect to servers. * Make /xdebug server_connect the default for this commit at least * Call window_check_servers() every time through io(), because... * Make window_check_servers() look for disconnected servers and restart them. * Add add_mode_to_str() which adds a channel or usermode to a string (sorted) * Make usermodes use add_mode_to_str() * Make channel modes use add_mode_to_str() * Now modes are not stored in bitmasks, not hard-coded at compile time. HUZZAH! * Nix "inactive" field in channels, channels are thrown away at disconnect * Don't allow channels to move between servers, natch. * Nix all the code to handle disconnected channels and such. * Use change_window_server() to move windows to new servers, because... * Make window_check_servers() auto-close windowless servers. * Make change_window_server(<server>, NOSERV) cause a disconnect from <server> * Don't honor /set auto_reconnect, we don't ever reconnect. * Fix printf() error in /on kick default output * Add new server state, SERVER_RECONNECT which means "i can be connected" * So now SERVER_CLOSED means "don't reconnect me" * Allow /server, /window server, and /reconnect to change CLOSED -> RECONNECT * Make server connections nonblocking. * Server connections are now nonrecursive, nonblocking, multi-protocol. HUZZAH! * GC a bunch of server code dealing with reconnection we don't use now. * Don't call window_check_servers() other than io() for sanity reasons. * Make /window server just change server, let w_c_s() bootstrap connection * Remove many window->channel->server sanity checks.
Make 'empty_string' (const char []). Now we're cooking with gas!
* Make inet_vhostsockaddr() extern so dcc can use it * Make dcc_open() use inet_vhostsockaddr() to bind /hostname to dcc conns * Don't allow -b and -q, or -b -and -s, as they cause deadlocks/panics * Fix casting error that caused $urlencode() of high bit chars to segfault * If swapping in a window that has no room for double status, recalculate all * If double-on in a window that has no room for it, recalculate all
More compiler nits fixed. Nothing worth fretting over.
Add sanity checking to avoid cross-family dcc problems, where we bind() a listening socket in one family and send out a dcc handshake for another family. Oops! Noticed by rain.
Convert m_strdup() to malloc_strdup().
* 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!
Nominally remove all uses of "unsafe" functions: (Commit 506)
* Convert all uses of strcpy() to strlcpy()
* Convert all uses of strcat() to strlcat()
* Convert all uses of strmcpy() to strlcpy()
* Convert all uses of strmcat() to strlcat()
* Convert all uses of sprintf() to snprintf()
* As much as possible, use 'sizeof var' in snprintf/strlcpy/strlcat.
* Qualify the size of some global vars so we can sizeof() them.
* Nuke strmcpy(), strmcat(), strmcat_ue(), strmccat(),
* Change strmopencat() to strlopencat().
* Change strmpcat() to strlpcat().
* Fix switch_hostname so it doesn't return a (const) string.
* Fix TimerTimeout so it doesn't return a (const) Timeval.
* Change things like (ret) to do ret while (0); for when "ret" is "{}".
* Fix initialization for load_level
* Stop passing in static strings into io(), so we can modify them.
* Make messages passed to io() more informative to the user.
* Fix CTCP FINGER handler not to assume (struct pw) strings can be overwritten.
* Use (socklen_t) and not an (int) for socket sizes.
* Don't return a value in a void function...
* Don't use return value of process_dcc_chat_ctcps() for assignment.
* Don't put semicolons after function bodies
* Fix $getopt() to save 'input_size' so we can use it with strl*().
* Convert all uses of stpcpy() to strlcat() and strlopencat().
* Nix checks for stpcpy() in configure -- regen configure.
* New /set, /SET SWITCH_CHANNELS_BETWEEN_WINDOWS * C language issues (const correctness, integer size correctness) * Revamp channel structure to hold window refnum and not window pointer * Add "current channel counter" to channel structure. * Determine "current channel" by election. * Garbage collect a lot of now unnecessary code. * Add get_echannel_by_refnum(), returns window's "elected" current channel * Add internal function is_waiting_for_channel() * Add internal function move_waiting_channel() * Add internal function get_winref_by_bound_channel() * Add internal function get_bound_channel_by_refnum() * Convert uses of get_channel_by_refnum() to get_echannel_by_refnum() * Fix $winbound() to work when given a window refnum * Fix valgrind issue with $regcomp() * Remove sanity checks from traverse_all_channels(); handled elsewhere now * Change traverse_all_channels() with "this server" or "not this server" arg * Nuke (Window *)->current_channel. Handled by channels now. HUZZAH! * Implement /ON SWITCH_WINDOWS again.
Another merge.
Whooo! I'm on a roll! Commit #487
* Add /timer -delete_for_window <winref> to delete window's timer.
* Enhance my_strerror() to take an EPIC Network Error and an errno.
* Enhance Getaddrinfo() to use AF_UNIX path as 'path' not 'host'.
* Confirmed that $match("\\[s s1 "s *"\\]" "s s") works like it should now.
* Store a "current window priority" number in each window.
* Add get_winref_by_servref() returns highest "priority" window for a server
* Have /defer track server, use server's "current window" (per above)
* I'd like to have other things use this, like maybe /xeval -s.
Fix various specious warnings from gcc, also, don't test for "sun_len" in configure; use "sa_len" test for that.
Yikes. Merged to become consistent with HEAD. Sorry for all the commits, I'll be quiet again soon. :) -wd
* 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...
Check for getaddrinfo() and getnameinfo() in configure otherwise we can't do ipv6 lookups. doh!
Update documentation prior to epic4-1.1.6 release Add "HAVE_GETSERVBYNAME" check to configure stuff. Remove /SET RANDOM_LOCAL_PORTS which has gone away. Fix some layout issues with gailib.c and change two function names. Fix comment issue with ircsig.c Fix uninitialized variable issue with keys.c Remove mention of /SET RANDOM_LOCAL_PORTS in network.c
#ifdef INET6 a bunch of uses of AF_INET6.
Add GAILIB, a bsd licensed getaddrinfo/getnameinfo implementation for ipv4 only systems. This was lifted from ruby, who lifted it from WIDE. Add #ifdef's as necessary to compile on non-ipv6 systems.
Update copyright notices and copyright dates.
* Add Getnameinfo(), front end to getnameinfo() takes GNI_INTEGER for DCC use * Fix inet_ntostr() to use Getnameinfo() instead of getnameinfo() directly. * Fix inet_ntostr() to return int for success/failure, not hostname. * Fix the DCC handshake generator to use inet_ntostr(). * Fix callers of inet_ntostr() to handle integer return values.
Re-revert (with additional changes) to make server connections and dcc both work at the same time.
* Applied a patch from NSX which fixes a problem with the last commit that prevents the inital server connection working. Other things also commited: * Fix for ODD_SERVER_STUFF so that it will never have a blank server field. * fixed $chr() to not have input size limits, however it still cores on random data. I'll fix this later. * Fix for get_time() in the case of HAVE_GETTIMEOFDAY being undefined. I forget who this was from. * Minor method addition to tabkey.ce.
* Allow $listen() to take a family argument, like $connect(). * Add some V6 macros in ircaux.h, modeled after V4 macros. * Add a "family" member to the dcc structure. Default to AF_INET for now. * Start fetching ports by calling inet_ntostr() instead of peeking directly -- into the sockaddr. This yields protocol independance. * Fix bug where $listen() or /dcc send w/o a virtual host caused NULL deref.
Fix indent-o in ircaux.c Change uses of the variable "error" to 'err' since "error" is a function. Change inet_vhostsockaddr() to take a port number, and furthermore change it to use Getaddrinfo() instead of slogging around directly with sockaddrs. This makes it protocol independant. Make ip_bindery() protocol independant. Huzzah! One step closer to IPv6 DCC. "Oops", there goes all the random port garbage. Too bad. It was an IPv4 only solution so the time has come for it to go.
Stop as soon as we get a connection in connectory().
Make sure we call Freeaddrinfo() in connectory().
Remove the second argument to inet_ntostr(), [socklen_t of the first argument] because the socket length of the first argument can be inferred directly from the first argument and passing in the length is totaly unecessary. Changes to callers of inet_ntostr() per above change. Change connectory() to call Getaddrinfo() directly and to iterate over all of the returned addresses until it finds one it likes. This change permits epic to automatically detect/support IPv4 and IPv6 server connections without user intervention. make Getaddrinfo(), Freeaddrinfo(), socklen(), Accept(), and Connect() all static functions.
Lots more work on the ipv6 front. Remove the last of the vestiges of the old historical address handlers (inet_ntop/inet_pton/inet_aton/inet_ntoa). Now everything, and I mean EVERYTHING goes through inet_strton and inet_ntostr which are just fancy front ends to getaddrinfo() and getnameinfo(). Quite a bit of EPIC is already family-independent, but there is still some left to be clubbed into submission. The project to add support for IPv6 is now about 75% complete! Perversely enough, the only thing stopping DCC from being essentially 100% IPv6 capable is the inability to send an IPv6 hostname through a handshake without breaking the standard...
* Fix parse_server_info() to properly handle ipv6 p-addrs * Add support for [<ipv6 p-addr>] to parse_server_info(). * Fix an off-by-one error in Getaddrinfo. Bleh. * Fix a malloc() size mistake in Getaddrinfo.
In connectory(), we were guessing what the address family was by "peeking" into the hostname. We did this so we could get the proper virtual host family. But getaddrinfo() can convert AF_UNSPEC into eg, AF_INET, so instead of guessing at the family and getting the virtual host first, get the remote host first, allowing getaddrinfo() to tell us what the socket family is, and then use that to get our virtual host. At this point, i believe that network.c actually supports ipv6 connections by way of AF_UNSPEC (if you give it an ipv6 p-addr). There's no support for it in /dcc or /server yet though, but that's coming up!
Fix some function names that I didn't like after sleeping on them. Add extra argument to inet_ntostr() which is passed to getaddrinfo().
OK. So i had some inspiration and decided not to go to bed. Vastly simplify the conversions between sockaddr/host/p-addr to sockaddr/host/p-addr. More simplifications yet to come. IPv6 support is roughly about 50% done now.
Huge major commit #1 in the great IPv6 support addition... Rather than include all of the changes here, read KNOWNBUGS changes.
*sigh* FAMILY() macro takes a (struct sockaddr) and not the (struct sockaddr *) that I had here. Pass me the dunce cap.
* Add the rest of the stuff as an extra arg to register_dcc_offer. register_dcc_offer is _such_ a hack. * Add a new data item to the DCC struct, a item-specific callback when the connect()ion is established. This is for forward comaptability. We still do our connect()ions psuedo-blocking but some day we won't. This is always NULL for now. * Create a function dcc_opened() which is called whenever a connect()ion on any dcc is established. This is basically the last half of dcc_open(). * Revamp dcc_open() to use dcc_opened(). * dcc_open() now returns -1 on error and 0 on success. Change all callers to this new return value. * The error value if a connect() on a unix domain socket failed is -1 (system error) not -9 (connection timed out) * Add support for Connect()ing to a unix domain socket. UDS servers work again. All of this pretty much leaves epic in pretty good shape after the great cleanup. Unless something major comes along, we'll test and then i'll roll out epic4-1.1.4 and then we can go forward with ipv6 from there.
Fix some broken usage of the V4ADDR macro which must be passed a (SA), not an (SA *). Reported by fudd.
Back out a couple of uses of AF_INET6. We definitely don't support IPv6 just yet and I'm not even sure it's safe to use the AF_INET6 macro on non-IPv6 aware systems, so to avoid possible compilation problems, just don't use AF_INET6 for any reason just yet.
Functionally complete the protocol independance of DCC. There are no more ISA's in server code or dcc. To phrase that differently, every IPv4 assumption in the server code or dcc has been identified and conditionalized. Adding support for ipv6 is now simply a matter of adding the conditionals to make it happen. Now we need to test what we have here and see how badly i've broken things. The only remaining IPv4 customers are /WINDOW CREATE (which is likely to stay ipv4 only for the time being) and $iptolong() and $longtoip() which clearly are IPv4 only concepts.
Make $connect() protocol independant. This requires changing dcc->offer to a (struct sockaddr_storage) and requires changing dcc_open and even register_dcc_offer. Much progress being made on the protocol-independance of DCC. Somehow I doubt IPv6 will ever come to DCC, but it's nice to at least say that we'll be prepared when it comes...
* Convert more (last?) inet_ntoa to inet_ntop, and inet_aton to inet_pton. * Fix bug with $convert() (one_to_another) * Try to make /window create only bind to 127.0.0.1.
Remove some debugging code from compat.c Fix /set status_ssl to not return NULL. I should fix this.
Nuke "local_addr" in server struct in favor of "local_sockname" Convert server to use "connectory" Convert wserv to use "connectory" Nuke connect_by_number() Reorder functions in network.c
Removed local shadowed variable.
Fix those three annoying functions in network.c that use static local variables, making them non-reentrant and fraught with peril. Now they require you pass in space to put the results.
This is a huge monster commit -- I put the particulars of the commit in KNOWNBUGS. I will only say here that this fixes a lot of issues with DCC and introduces a lot of protocol independance into the networking API that epic works with. Good things will continue to come in the future!
The last round of changes for tonight. More of the same... I promise! I'll document the user visible parts of this soon! Really! =) I mean it!
Milestone #2!
EPIC now does non-blocking connects (sort of). But you are not given
the opportunity to "do what you want" during the non-blocking connect.
EPIC sits in a select() call until the connect() succeeds or fails. But
you can hit ^C and reliably cancel the connection-in-progress. This is
an improvement because we don't have to hack up connect timeouts using
alarm() any more.
Also...
-- Output an error/warning message if you try to create a unix domain
socket and your system doesn't have UDS's.
-- Change /set max_reconnects the way everybody has been insisting I do.
Basically, the new semantics are:
/set auto_reconnect 0
-- No reconnects EVER for ANY reason
/set auto_reconnect 1
-- One reconnect, before failure
/set auto_reconnect N
-- N reconnects, before failure.
No more "freebies", which everybody seemed to hate. Oh well.
Yet more changes! =) -- Collapse "read" and "write" variables in the DCC object to a single variable "socket" which points to our internet peer. Much simpler! -- Nuke the now unused "struct in_addr local_addr;" Huzzah! -- Fix a printf() format bug that caused the ports in dcc handshakes to always come out as 0. -- Convert unecessary uses of gethostbyname() to inet_anyton() to catch the optimization break for dotted-quads. -- Do direct assignments, not memmove()s of (struct in_addr)'s. -- Add future gracious (non-)support for colon-notation IPv6 addresses in DCC handshakes. -- Fix the "dcc handshake sanity checker" to not be quite so lame. -- Fix a bug where some $channel() may return % before some users if their "halfop" status is -1, instead of only when it's 1. Hunted by adm, fix from paladin. -- Add error checking for some calls to inet_aton(). Need more error checking!
Yet another swath of changes in The Great IPv4 Cleanup. This time I took a broad hatchet to the resolver-assistant functions in network.c. Using modern techniques really increases readability and makes it look less like a hack. Making good progress!
Next round of in_addr/u_short -> sockaddr_in conversions, along with some other minor details. As far as i know, this shouldn't break anything, but I don't promise that. Save your old binary first! If anything is really bad, let me know. I'll fix it ASAP.
Back out part of the last commit -- it doesn't seem to be such a great idea to depend on the existance of "sa_len" on linux, which appears, but doesn't exist. *mutter*
Check (struct sockaddr) for sa_len, and use this as a hint as to whether sockaddrs have a "length" field in them. I will phase out the (now obsolete) check for HAVE_SUN_LEN in configure, once i'm comfortable that checking for HAVE_SA_LEN is sufficient. Whack up the (struct sockaddr_storage) to honor the HAVE_SA_LEN value probed by configure, as requested by Q (Kurt R.). Regen configure. This brings the ssl stuff into play from CE's last commit.
Fix typo.
More complete support for random local ports; /set random_local_ports now cooperates with /setenv EPIC_USE_HIGHPORTS=1, and it works on freebsd, openbsd, and linux, such as it is.
Initial import into CVS
Initial revision
| CVS Admin |
Powered by ViewCVS 0.9.2 |