Remove FLAGS_SENDQEX, fix sendq exceeded snotes for servers.

from ircd-ratbox
This commit is contained in:
Jilles Tjoelker 2009-12-21 16:58:25 +01:00
parent 01a7f6d4f9
commit cef7a7bc4e
3 changed files with 5 additions and 9 deletions

View file

@ -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);

View file

@ -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));

View file

@ -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;
}
}