From cbbd56b8290f6569a815cf05ca7bd79279fa1b94 Mon Sep 17 00:00:00 2001 From: Jackmcbarn Date: Mon, 23 May 2011 21:52:52 -0400 Subject: Fix recursion of QuitUser in SendQ quits --- include/cull_list.h | 2 ++ include/users.h | 6 ++++++ 2 files changed, 8 insertions(+) (limited to 'include') diff --git a/include/cull_list.h b/include/cull_list.h index 960874bd6..db1ac28db 100644 --- a/include/cull_list.h +++ b/include/cull_list.h @@ -22,11 +22,13 @@ class CoreExport CullList { std::vector list; + std::vector SQlist; public: /** Adds an item to the cull list */ void AddItem(classbase* item) { list.push_back(item); } + void AddSQItem(LocalUser* item) { SQlist.push_back(item); } /** Applies the cull list (deletes the contents) */ diff --git a/include/users.h b/include/users.h index 215b58a1d..f8bf5d009 100644 --- a/include/users.h +++ b/include/users.h @@ -278,6 +278,12 @@ class CoreExport User : public Extensible */ unsigned int quitting:1; + /** Recursion fix: user is out of SendQ and will be quit as soon as possible. + * This can't be handled normally because QuitUser itself calls Write on other + * users, which could trigger their SendQ to overrun. + */ + unsigned int quitting_sendq:1; + /** This is true if the user matched an exception (E:Line). It is used to save time on ban checks. */ unsigned int exempt:1; -- cgit v1.3.1-10-gc9f91