diff --git a/include/client.h b/include/client.h index 178a9a37..13bd0966 100644 --- a/include/client.h +++ b/include/client.h @@ -401,7 +401,6 @@ struct ListClient #define FLAGS_GOTID 0x0080 /* successful ident lookup achieved */ #define FLAGS_FLOODDONE 0x0100 /* flood grace period over / reported */ #define FLAGS_NORMALEX 0x0400 /* Client exited normally */ -#define FLAGS_SENDQEX 0x0800 /* Sendq exceeded */ #define FLAGS_MARK 0x10000 /* marked client */ #define FLAGS_HIDDEN 0x20000 /* hidden server */ #define FLAGS_EOB 0x40000 /* EOB */ @@ -592,7 +591,7 @@ extern client_t *next_client(struct Client *, const char *); #define accept_message(s, t) ((s) == (t) || (rb_dlinkFind((s), &((t)->localClient->allow_list)))) extern void del_all_accepts(struct Client *client_p); -extern void dead_link(struct Client *client_p); +extern void dead_link(struct Client *client_p, int sendqex); extern int show_ip(struct Client *source_p, struct Client *target_p); extern int show_ip_conf(struct ConfItem *aconf, struct Client *target_p); diff --git a/src/client.c b/src/client.c index 7aa5b941..47ba0a45 100644 --- a/src/client.c +++ b/src/client.c @@ -1105,7 +1105,7 @@ exit_aborted_clients(void *unused) * */ void -dead_link(struct Client *client_p) +dead_link(struct Client *client_p, int sendqex) { struct abort_client *abt; @@ -1115,7 +1115,7 @@ dead_link(struct Client *client_p) abt = (struct abort_client *) rb_malloc(sizeof(struct abort_client)); - if(client_p->flags & FLAGS_SENDQEX) + if(sendqex) rb_strlcpy(abt->notice, "Max SendQ exceeded", sizeof(abt->notice)); else rb_snprintf(abt->notice, sizeof(abt->notice), "Write error: %s", strerror(errno)); diff --git a/src/send.c b/src/send.c index 4c04daf3..4aebff91 100644 --- a/src/send.c +++ b/src/send.c @@ -85,10 +85,7 @@ _send_linebuf(struct Client *to, buf_head_t *linebuf) get_sendq(to)); } - if(IsClient(to)) - to->flags |= FLAGS_SENDQEX; - - dead_link(to); + dead_link(to, 1); return -1; } else @@ -200,7 +197,7 @@ send_queued(struct Client *to) if(retlen == 0 || (retlen < 0 && !rb_ignore_errno(errno))) { - dead_link(to); + dead_link(to, 0); return; } }