mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 07:54:05 +01:00
Remove FLAGS_SENDQEX, fix sendq exceeded snotes for servers.
from ircd-ratbox
This commit is contained in:
parent
01a7f6d4f9
commit
cef7a7bc4e
3 changed files with 5 additions and 9 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue