Changeset 728 for branches/ithildin-1.1
- Timestamp:
- 05/12/06 00:36:30 (6 years ago)
- Location:
- branches/ithildin-1.1/modules/ircd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ithildin-1.1/modules/ircd/client.c
r717 r728 114 114 ircd.stats.serv.unkclients--; 115 115 cli->conn->cli = NULL; 116 destroy_connection(cli->conn, msg); 116 117 /* If sendq_flush does not close the connection for us (it will 118 * return 0 if it does) then close the connection. This ensures 119 * that we do best-effort work on dumping the last dribbly bits of 120 * the sendq out to the client if we can. We do not try hard to 121 * make this work, though! */ 122 if (sendq_flush(cli->conn)) 123 destroy_connection(cli->conn, msg); 117 124 } 118 125 -
branches/ithildin-1.1/modules/ircd/connection.c
r723 r728 47 47 /* Try to send them an error message if we can. We assume someone has 48 48 * tried to flush their sendq or doesn't think we should, so if it's 49 * empty we send an error, otherwise we clean it off... */ 49 * empty we send an error, otherwise we clean it off and don't bother 50 * trying to send since other sends have already failed (and we infer 51 * that this means the socket is not writeable) */ 50 52 if (STAILQ_EMPTY(&c->sendq) && reason != NULL && *reason != '\0') { 51 53 snprintf(msg, 512, "\r\nERROR :Closing Link: %s (%s)\r\n", -
branches/ithildin-1.1/modules/ircd/server.c
r703 r728 117 117 } 118 118 119 /* if this server is ours, we have to close the connection. also, we120 * should try as best we can to flush the buffer. this probably won't work121 * very well, but we take a stab at it. */119 /* If this server is ours we have to close the connection. We try first 120 * to flush the sendq. If sendq_flush returns 0 it has closed the 121 * connection for us (socket error), otherwise we close it ourself. */ 122 122 if (MYSERVER(srv)) { 123 if (sendq_flush(srv->conn)) {124 srv->conn->srv = NULL;123 srv->conn->srv = NULL; 124 if (sendq_flush(srv->conn)) 125 125 destroy_connection(srv->conn, msg); 126 }127 126 } 128 127
Note: See TracChangeset
for help on using the changeset viewer.
