From 90f349cd108f2a522575d862100ed1fbc8e3ba75 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 6 May 2005 00:51:48 +0000 Subject: Fixed park crash bug #63 reported by ViaraiX git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1312 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index ecfb5539e..9ee351e08 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -4361,6 +4361,8 @@ int InspIRCd(char** argv, int argc) strlcpy(sanitized,single_line.c_str(),MAXBUF); if (*sanitized) { + log(DEBUG,"ref in: %lu",fd_ref_table[currfd]); + userrec* old_comp = fd_ref_table[currfd]; // we're gonna re-scan to check if the nick is gone, after every // command - if it has, we're gonna bail process_buffer(sanitized,current); @@ -4368,7 +4370,11 @@ int InspIRCd(char** argv, int argc) // we cant do anything more with their buffer, so bail. // there used to be an ugly, slow loop here. Now we have a reference // table, life is much easier (and FASTER) - if (!fd_ref_table[currfd]) + userrec* new_comp = fd_ref_table[currfd]; + log(DEBUG,"ref out: %lu",fd_ref_table[currfd]); + if (old_comp != new_comp) + log(DEBUG,"Bailing, old_comp != new_comp"); + if ((currfd < 0) || (!fd_ref_table[currfd]) || (old_comp != new_comp)) goto label; } -- cgit v1.3.1-10-gc9f91