Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2006-07-23 17:55:25 UTC
Modified files:
ircd/s_bsd.c ChangeLog
Log message:
Do not leak Connection for errored outbound server connections.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.801 ircu2.10/ChangeLog:1.802
--- ircu2.10/ChangeLog:1.801 Sun Jul 23 10:30:56 2006
+++ ircu2.10/ChangeLog Sun Jul 23 10:55:15 2006
@@ -1,5 +1,11 @@
2006-07-23 Michael Poole <[EMAIL PROTECTED]>
+ * ircd/s_bsd.c (close_connection): Clear FREEFLAG_SOCKET when
+ closing the socket.
+ (client_sock_callback): Fix typo in a comment.
+
+2006-07-23 Michael Poole <[EMAIL PROTECTED]>
+
* ircd/channel.c (check_spambot_warning): Avoid division by zero;
bug pointed out by comstud.
Index: ircu2.10/ircd/s_bsd.c
diff -u ircu2.10/ircd/s_bsd.c:1.85 ircu2.10/ircd/s_bsd.c:1.86
--- ircu2.10/ircd/s_bsd.c:1.85 Fri Jul 14 17:09:10 2006
+++ ircu2.10/ircd/s_bsd.c Sun Jul 23 10:55:15 2006
@@ -19,7 +19,7 @@
*/
/** @file
* @brief Functions that now (or in the past) relied on BSD APIs.
- * @version $Id: s_bsd.c,v 1.85 2006/07/15 00:09:10 entrope Exp $
+ * @version $Id: s_bsd.c,v 1.86 2006/07/23 17:55:15 entrope Exp $
*/
#include "config.h"
@@ -437,6 +437,7 @@
close(cli_fd(cptr));
socket_del(&(cli_socket(cptr))); /* queue a socket delete */
cli_fd(cptr) = -1;
+ cli_freeflag(cptr) &= ~FREEFLAG_SOCKET;
}
SetFlag(cptr, FLAG_DEADSOCKET);
@@ -887,7 +888,7 @@
cli_error(cptr) = ev_data(ev);
if (s_state(&(con_socket(con))) == SS_CONNECTING) {
completed_connection(cptr);
- /* for some reason, the os_get_sockerr() in completed_connect()
+ /* for some reason, the os_get_sockerr() in completed_connection()
* can return 0 even when ev_data(ev) indicates a real error, so
* re-assign the client error here.
*/
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches