From 64f2a7eb2c2dd82c690c03ff460081dc9a9706be Mon Sep 17 00:00:00 2001 From: jilles Date: Thu, 29 Mar 2007 13:03:06 -0700 Subject: [PATCH] [svn] Merge old trunk r2077,r2079: - Move closing of servlink control fd to close_connection() instead of doing it in exit_local_server(), and make sure we first close the data fd and then the control fd. - Have servlink process ready fds in order net, data, ctrl instead of ctrl, data, net. This seems to fix the problem that squit reasons do not show up on the other side of a ziplink (by making it send any final SQUIT and/or ERROR before noticing the closed control fd). --- ChangeLog | 11 +++++++++++ include/serno.h | 2 +- servlink/io.c | 4 ++-- src/client.c | 17 ++++------------- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 57d5462..0eb6344 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +jilles 2007/03/28 23:17:06 UTC (20070328-3317) + Log: + Don't show the UID if a TS6 server sends a kick with + an empty or no comment. Note that charybdis never sends + such kicks. + + + Changes: Modified: + +4 -4 trunk/modules/core/m_kick.c (File Modified) + + jilles 2007/03/28 15:40:24 UTC (20070328-3307) Log: Merge old trunk r2081: diff --git a/include/serno.h b/include/serno.h index b5155a8..b24b94f 100644 --- a/include/serno.h +++ b/include/serno.h @@ -1 +1 @@ -#define SERNO "20070328-3307" +#define SERNO "20070328-3317" diff --git a/servlink/io.c b/servlink/io.c index 754fcd7..f4f91f2 100644 --- a/servlink/io.c +++ b/servlink/io.c @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Id: io.c 1285 2006-05-05 15:03:53Z nenolod $ + * $Id: io.c 3319 2007-03-29 20:03:06Z jilles $ */ #include "setup.h" @@ -95,7 +95,7 @@ io_loop(int nfds) else if(ret > 0) { /* call any callbacks */ - for (i = 0; i < 3; i++) + for (i = 2; i >= 0; i--) { if(FD_ISSET(fds[i].fd, &rfds) && fds[i].read_cb) (*fds[i].read_cb) (); diff --git a/src/client.c b/src/client.c index 6279a56..29e2fed 100644 --- a/src/client.c +++ b/src/client.c @@ -21,7 +21,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: client.c 3167 2007-01-26 18:52:11Z jilles $ + * $Id: client.c 3319 2007-03-29 20:03:06Z jilles $ */ #include "stdinc.h" #include "config.h" @@ -1554,12 +1554,6 @@ exit_local_server(struct Client *client_p, struct Client *source_p, struct Clien source_p->name, comment); } - if(source_p->localClient->ctrlfd >= 0) - { - comm_close(source_p->localClient->ctrlfd); - source_p->localClient->ctrlfd = -1; - } - if(source_p->servptr && source_p->servptr->serv) dlinkDelete(&source_p->lnode, &source_p->servptr->serv->servers); else @@ -2105,13 +2099,10 @@ close_connection(struct Client *client_p) client_p->localClient->fd = -1; } - if(HasServlink(client_p)) + if(-1 < client_p->localClient->ctrlfd) { - if(client_p->localClient->fd > -1) - { - comm_close(client_p->localClient->ctrlfd); - client_p->localClient->ctrlfd = -1; - } + comm_close(client_p->localClient->ctrlfd); + client_p->localClient->ctrlfd = -1; } linebuf_donebuf(&client_p->localClient->buf_sendq);