"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/core/servers-reconnect.c" between
irssi-1.2.2.tar.gz and irssi-1.2.3.tar.gz

About: irssi is a terminal based IRC client that also supports SILC and ICB protocols via plugins.

servers-reconnect.c  (irssi-1.2.2):servers-reconnect.c  (irssi-1.2.3)
skipping to change at line 154 skipping to change at line 154
server_connect_unref(conn); server_connect_unref(conn);
} }
} }
g_slist_free(list); g_slist_free(list);
return 1; return 1;
} }
static void sserver_connect(SERVER_SETUP_REC *rec, SERVER_CONNECT_REC *conn) static void sserver_connect(SERVER_SETUP_REC *rec, SERVER_CONNECT_REC *conn)
{ {
conn->family = rec->family;
conn->address = g_strdup(rec->address);
if (conn->port == 0) conn->port = rec->port;
server_setup_fill_reconn(conn, rec); server_setup_fill_reconn(conn, rec);
server_reconnect_add(conn, rec->last_connect+reconnect_time); server_reconnect_add(conn, rec->last_connect+reconnect_time);
server_connect_unref(conn); server_connect_unref(conn);
} }
static SERVER_CONNECT_REC * static SERVER_CONNECT_REC *
server_connect_copy_skeleton(SERVER_CONNECT_REC *src, int connect_info) server_connect_copy_skeleton(SERVER_CONNECT_REC *src, int connect_info)
{ {
SERVER_CONNECT_REC *dest; SERVER_CONNECT_REC *dest;
skipping to change at line 184 skipping to change at line 180
dest->reconnection = src->reconnection; dest->reconnection = src->reconnection;
dest->proxy = g_strdup(src->proxy); dest->proxy = g_strdup(src->proxy);
dest->proxy_port = src->proxy_port; dest->proxy_port = src->proxy_port;
dest->proxy_string = g_strdup(src->proxy_string); dest->proxy_string = g_strdup(src->proxy_string);
dest->proxy_string_after = g_strdup(src->proxy_string_after); dest->proxy_string_after = g_strdup(src->proxy_string_after);
dest->proxy_password = g_strdup(src->proxy_password); dest->proxy_password = g_strdup(src->proxy_password);
dest->tag = g_strdup(src->tag); dest->tag = g_strdup(src->tag);
if (connect_info) { if (connect_info) {
dest->family = src->family; dest->family = src->family;
dest->address = g_strdup(src->address); dest->address = g_strdup(src->address);
dest->port = src->port; dest->port = src->port;
dest->password = g_strdup(src->password); dest->password = g_strdup(src->password);
dest->use_tls = src->use_tls;
dest->tls_cert = g_strdup(src->tls_cert);
dest->tls_pkey = g_strdup(src->tls_pkey);
dest->tls_verify = src->tls_verify;
dest->tls_cafile = g_strdup(src->tls_cafile);
dest->tls_capath = g_strdup(src->tls_capath);
dest->tls_ciphers = g_strdup(src->tls_ciphers);
dest->tls_pinned_cert = g_strdup(src->tls_pinned_cert);
dest->tls_pinned_pubkey = g_strdup(src->tls_pinned_pubkey);
} }
dest->chatnet = g_strdup(src->chatnet); dest->chatnet = g_strdup(src->chatnet);
dest->nick = g_strdup(src->nick); dest->nick = g_strdup(src->nick);
dest->username = g_strdup(src->username); dest->username = g_strdup(src->username);
dest->realname = g_strdup(src->realname); dest->realname = g_strdup(src->realname);
if (src->own_ip4 != NULL) { if (src->own_ip4 != NULL) {
dest->own_ip4 = g_new(IPADDR, 1); dest->own_ip4 = g_new(IPADDR, 1);
memcpy(dest->own_ip4, src->own_ip4, sizeof(IPADDR)); memcpy(dest->own_ip4, src->own_ip4, sizeof(IPADDR));
skipping to change at line 210 skipping to change at line 216
dest->own_ip6 = g_new(IPADDR, 1); dest->own_ip6 = g_new(IPADDR, 1);
memcpy(dest->own_ip6, src->own_ip6, sizeof(IPADDR)); memcpy(dest->own_ip6, src->own_ip6, sizeof(IPADDR));
} }
dest->channels = g_strdup(src->channels); dest->channels = g_strdup(src->channels);
dest->away_reason = g_strdup(src->away_reason); dest->away_reason = g_strdup(src->away_reason);
dest->no_autojoin_channels = src->no_autojoin_channels; dest->no_autojoin_channels = src->no_autojoin_channels;
dest->no_autosendcmd = src->no_autosendcmd; dest->no_autosendcmd = src->no_autosendcmd;
dest->unix_socket = src->unix_socket; dest->unix_socket = src->unix_socket;
dest->use_tls = src->use_tls;
dest->tls_cert = g_strdup(src->tls_cert);
dest->tls_pkey = g_strdup(src->tls_pkey);
dest->tls_verify = src->tls_verify;
dest->tls_cafile = g_strdup(src->tls_cafile);
dest->tls_capath = g_strdup(src->tls_capath);
dest->tls_ciphers = g_strdup(src->tls_ciphers);
dest->tls_pinned_cert = g_strdup(src->tls_pinned_cert);
dest->tls_pinned_pubkey = g_strdup(src->tls_pinned_pubkey);
return dest; return dest;
} }
#define server_should_reconnect(server) \ #define server_should_reconnect(server) \
((server)->connection_lost && !(server)->no_reconnect && \ ((server)->connection_lost && !(server)->no_reconnect && \
((server)->connrec->chatnet != NULL || \ ((server)->connrec->chatnet != NULL || \
!(server)->banned)) !(server)->banned))
#define sserver_connect_ok(rec, net) \ #define sserver_connect_ok(rec, net) \
(!(rec)->banned && (rec)->chatnet != NULL && \ (!(rec)->banned && (rec)->chatnet != NULL && \
skipping to change at line 296 skipping to change at line 292
an hour. */ an hour. */
now = time(NULL); now = time(NULL);
for (tmp = setupservers; tmp != NULL; tmp = tmp->next) { for (tmp = setupservers; tmp != NULL; tmp = tmp->next) {
SERVER_SETUP_REC *rec = tmp->data; SERVER_SETUP_REC *rec = tmp->data;
if (sserver_connect_ok(rec, conn->chatnet) && if (sserver_connect_ok(rec, conn->chatnet) &&
(!rec->last_connect || !rec->last_failed || (!rec->last_connect || !rec->last_failed ||
rec->last_connect < now-FAILED_RECONNECT_WAIT)) { rec->last_connect < now-FAILED_RECONNECT_WAIT)) {
if (rec == sserver) if (rec == sserver)
conn->port = server->connrec->port; conn->port = server->connrec->port;
sserver_connect(rec, conn); sserver_connect(rec, conn);
return; return;
} }
} }
/* just try the next server in list */ /* just try the next server in list */
use_next = through = FALSE; use_next = through = FALSE;
for (tmp = setupservers; tmp != NULL; ) { for (tmp = setupservers; tmp != NULL; ) {
SERVER_SETUP_REC *rec = tmp->data; SERVER_SETUP_REC *rec = tmp->data;
 End of changes. 5 change blocks. 
16 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)