summaryrefslogtreecommitdiff
path: root/src/core/wee-network.c
AgeCommit message (Collapse)Author
2018-05-22core: unhook TLS handshake fd before calling connect callbackSimon Arlott
When there are multiple addresses for a server and a TLS handshake failure occurs, the next server in the list will connect and then timeout without performing any TLS handshake. This is because irc_server_close_connection closes server->sock so the next pipe to be created reuses that fd, but the hook for the handshake fd still exists when the next connection attempt is started. The hook for network_connect_child_read_cb is never added because a hook for the reused fd number still exists. Resolve this by removing the handshake hook before calling the connect callback.
2018-01-07core: fix some stylesSébastien Helleu
2018-01-05core: update copyright datesSébastien Helleu
2017-01-01core: update copyright datesSébastien Helleu
2016-12-13core, xfer: display more information on fork errors (issue #573)Sébastien Helleu
2016-08-20api: fix crash in function network_connect_to() if address is NULL (issue #781)Sébastien Helleu
2016-08-19api: fix connection to servers with hook_connect() on Windows 10 with ↵Sébastien Helleu
Windows subsystem for Linux (issue #770) The test on socketpair() function is now made when hooks are initialized (instead of doing the test at compilation time).
2016-08-07core: irc, xfer: do not check return code of res_init()Sébastien Helleu
If the call to res_init() fails, the connection may be OK anyway or in worst case it will fail (with an appropriate error) if the name can not be resolved.
2016-08-07core, irc, xfer: add missing includes for function res_init()Sébastien Helleu
2016-08-07core/plugins: Use res_init before getaddrinfo.Raghavendra Prabhu
With weechat, if the network changes in anyway that causes resolv.conf to be updated, that is not picked up, resulting in irc: connecting to server XXXX.com/1026 (SSL)... irc: address "XXX.com" not found irc: error: Name or service not known irc: reconnecting to server in 30 seconds This happens, especially when one connects to an irc server behind a VPN. This can also happen when there is no network connectivity weechat was started but later network is connected to. The fix is simple, it relies on calling res_init (3) before getaddrinfo in network_connect_child and other places. res_init reloads the resolv.conf and getaddrinfo does not fail with address resolution error.
2016-05-27core, irc, xfer: display more information in memory allocation errors (issue ↵Sébastien Helleu
#573)
2016-03-22core: add missing pointer argument in calls to hook_connect callbackSébastien Helleu
2016-03-21core: add pointer in some callbacks (closes #406)Sébastien Helleu
This pointer is the first argument received by callbacks, and the existing argument "data" is now automatically freed by WeeChat when the object containing the callback is removed. With this new pointer, the linked list of callbacks in scripts has been removed. This will improve speed of scripts (using a lot of hooks), reduce memory used by scripts and reduce time to unload scripts. Following functions are affected in the C API: * exec_on_files * config_new * config_new_section * config_new_option * hook_command * hook_command_run * hook_timer * hook_fd * hook_process * hook_process_hashtable * hook_connect * hook_print * hook_signal * hook_hsignal * hook_config * hook_completion * hook_modifier * hook_info * hook_info_hashtable * hook_infolist * hook_hdata * hook_focus * unhook_all_plugin * buffer_new * bar_item_new * upgrade_new * upgrade_read
2016-01-01core: update copyright datesSébastien Helleu
2015-12-10irc: add support of SNI in SSL connection to IRC server (closes #620)Sébastien Helleu
2015-07-18core: fix crash if a file descriptor used in hook_fd() is too high (> 1024 ↵Sébastien Helleu
on Linux/BSD) (closes #465) The calls to select() are replaced by poll(), which doesn't have limitation on file descriptor number.
2015-07-17core: fix format of commentSébastien Helleu
2015-05-01core: fix compilation on CygwinSébastien Helleu
The header sys/select.h is now required for select() function.
2015-04-30core: add comments after some #endifSébastien Helleu
2015-01-21core: add gnutls version in #if compiler directivesSébastien Helleu
2015-01-01core: update copyright datesSébastien Helleu
2014-03-16core: fix compilation on SmartOS (bug #40981, closes #23)Sebastien Helleu
2014-01-09xfer: add support of IPv6 for DCC chat/file (patch #7992)Andrew Potter
2014-01-01core: update copyright datesSebastien Helleu
2013-09-19core: add support of secured data in proxy options username/password ↵Sebastien Helleu
(evaluate content)
2013-07-27core: add secured data with optional encryption in file sec.confSebastien Helleu
2013-05-24core: fix compilation error when gnutls is not foundSebastien Helleu
2013-05-22core: fix compilation warningsSebastien Helleu
2013-03-17core: fix typos in many comments and some stringsSebastien Helleu
2013-01-04core: fix compilation on OpenBSD (bug #38022)Simon Kuhnle
File "sys/uio.h" needs to be included explicitly for use of "struct iovec" on OpenBSD. Signed-off-by: Simon Kuhnle <simon@blarzwurst.de>
2013-01-01core: update copyright datesSebastien Helleu
2012-12-15core: move comments with description of C file to top of filesSebastien Helleu
2012-12-13core: reformat comments for functionsSebastien Helleu
2012-10-18core: fix gnutls warningsstfn
2012-10-17core: fix sendmsg/recvmsg on BSD/OSX by sending 1 byte of data (in hook_connect)Simon Arlott
2012-10-14api: connect with IPv6 by default in hook_connect (with fallback to IPv4), ↵Simon Arlott
shuffle list of hosts for a same address (task #11205)
2012-08-25core: fix IP address returned by hook_connect (return IP really used, not ↵Sebastien Helleu
first IP for hostname)
2012-08-14core: add new plugin "script" (scripts manager, replacing scripts weeget.py ↵Sebastien Helleu
and script.pl)
2012-08-14core: add hidden command line options --no-gnutls and --no-gcrypt (no ↵Sebastien Helleu
init/deinit of gnutls/crypt, useful for valgrind/electric-fence)
2012-08-08core: fix connection to host in child process when socket is non-blocking ↵Sebastien Helleu
(with or without proxy)
2012-08-06core: return error string to callback of hook_connect if getaddrinfo fails ↵Sebastien Helleu
in child process
2012-07-27relay: add support of SSL (for irc and weechat protocols), new option ↵Sebastien Helleu
relay.network.ssl_cert_key (task #12044)
2012-06-01core: test return code when reading flags with fcntl (set flags to 0 if error)Sebastien Helleu
2012-03-23core: add a connection timeout for child process in hook_connect (bug #35966)Sebastien Helleu
2012-01-08core: update copyright datesSebastien Helleu
2011-12-01core: remove obsolete commentSebastien Helleu
2011-10-26core: remove unneeded whitespaceSebastien Helleu
2011-10-23core: enable background process under Cygwin to connect to servers, fix ↵Sebastien Helleu
reconnection problem (bug #34626) The connection was not made with a fork() under Cygwin because the connect() in child process was not working. This seems to be fixed in latest Cygwin, so this hack has been removed and now a fork() is done for all systems.
2011-09-22core: remove compilation warnings about unused return values of functionsSebastien Helleu
2011-08-26core: replace deprecated gnutls function ↵Sebastien Helleu
"gnutls_certificate_client_set_retrieve_function" by new function "gnutls_certificate_set_retrieve_function" (gnutls >= 2.11.0)