Compare commits

...

4 Commits

Author SHA1 Message Date
Arnaud Cornet 237f729221 Update changelog 2007-08-19 10:09:26 +02:00
Arnaud Cornet e1b7de1735 Fix crash on startup. 2007-08-19 09:26:59 +02:00
nohar 99ba56376a Initiate a 0.6.1 copy. Patch connection.c 2007-07-16 19:48:43 +00:00
nohar 3a309b0a06 Retag 0.6.0 release. 2007-02-27 20:52:39 +00:00
3 changed files with 12 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2007-08-19 Arnaud Cornet <arnaud.cornet@gmail.com>
* src/irc.c: Fix crash on startup.
Fix half open socket leak.
* Release 0.6.1
2007-02-17 Arnaud Cornet <arnaud.cornet@gmail.com> 2007-02-17 Arnaud Cornet <arnaud.cornet@gmail.com>
* src/lex.l: Uniformize backlog options with backlog_ prefix. * src/lex.l: Uniformize backlog options with backlog_ prefix.

View File

@ -54,8 +54,9 @@ void connection_close(connection_t *cn)
(long)cn->handle); (long)cn->handle);
if (cn->connected != CONN_DISCONN) { if (cn->connected != CONN_DISCONN) {
cn->connected = CONN_DISCONN; cn->connected = CONN_DISCONN;
shutdown(cn->handle, SHUT_RDWR); if (close(cn->handle) == -1)
close(cn->handle); mylog(LOG_WARN, "Error on socket close: %s",
strerror(errno));
} }
} }
@ -409,7 +410,7 @@ static int read_socket_SSL(connection_t *cn)
if (cn_is_connected(cn)) { if (cn_is_connected(cn)) {
mylog(LOG_DEBUGTOOMUCH, "fd %d: Connection lost", mylog(LOG_DEBUGTOOMUCH, "fd %d: Connection lost",
cn->handle); cn->handle);
cn->connected = CONN_DISCONN; connection_close(cn);
} }
return 1; return 1;
} }
@ -444,7 +445,7 @@ static int read_socket(connection_t *cn)
if (cn_is_connected(cn)) { if (cn_is_connected(cn)) {
mylog(LOG_DEBUGVERB, "fd %d: Connection lost", mylog(LOG_DEBUGVERB, "fd %d: Connection lost",
cn->handle); cn->handle);
cn->connected = CONN_DISCONN; connection_close(cn);
mylog(LOG_DEBUGTOOMUCH, "fd %d: read() %s", cn->handle, mylog(LOG_DEBUGTOOMUCH, "fd %d: read() %s", cn->handle,
strerror(errno)); strerror(errno));
} }
@ -1003,7 +1004,6 @@ static connection_t *connection_init(int anti_flood, int ssl, int timeout,
conn->ssl_check_mode = SSL_CHECK_NONE; conn->ssl_check_mode = SSL_CHECK_NONE;
#endif #endif
conn->connected = CONN_NEW; conn->connected = CONN_NEW;
return conn; return conn;
} }

View File

@ -1922,8 +1922,8 @@ static void irc_close(struct link_any *l)
LINK(l)->name, timer); LINK(l)->name, timer);
LINK(is)->recon_timer = timer; LINK(is)->recon_timer = timer;
irc_server_free((struct link_server *)is);
LINK(is)->l_server = NULL; LINK(is)->l_server = NULL;
irc_server_free((struct link_server *)is);
} else { } else {
irc_client_close((struct link_client *)l); irc_client_close((struct link_client *)l);
} }