Update of /cvsroot/mahogany/M/src/mail
In directory usw-pr-cvs1:/tmp/cvs-serv9909/src/mail

Modified Files:
        ThreadJWZ.cpp 
Log Message:
increase the limit for the thread depth checks: 1000 is too small for some mailboxes!

Index: ThreadJWZ.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/mail/ThreadJWZ.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -b -u -2 -r1.22 -r1.23
--- ThreadJWZ.cpp       12 Jan 2002 14:56:46 -0000      1.22
+++ ThreadJWZ.cpp       22 Feb 2002 18:23:36 -0000      1.23
@@ -52,4 +52,7 @@
 */
 
+// consider that no thread can be more than this level deep
+#define MAX_THREAD_DEPTH (100000)
+
 // ----------------------------------------------------------------------------
 // constants
@@ -414,5 +417,5 @@
 void Threadable::destroy() {
    static size_t depth = 0;
-   CHECK_RET(depth < 1000, "Deep recursion in Threadable::destroy()");
+   CHECK_RET(depth < MAX_THREAD_DEPTH, "Deep recursion in Threadable::destroy()");
    if (m_child != 0)
    {
@@ -772,5 +775,5 @@
    const size_t foolish = 1000000000;
    static size_t depth = 0;
-   CHECK(depth < 1000, foolish,
+   CHECK(depth < MAX_THREAD_DEPTH, foolish,
       "Deep recursion in ThreadContainer::getIndex()");
    Threadable *th = getThreadable();
@@ -838,5 +841,5 @@
 {
    static size_t depth = 0;
-   CHECK(depth < 1000, true, "Deep recursion in ThreadContainer::findChild()");
+   CHECK(depth < MAX_THREAD_DEPTH, true, "Deep recursion in 
+ThreadContainer::findChild()");
    if (m_child == target)
       return true;
@@ -865,5 +868,5 @@
 {
    static size_t depth = 0;
-   CHECK_RET(depth < 1000, "Deep recursion in ThreadContainer::flush()");
+   CHECK_RET(depth < MAX_THREAD_DEPTH, "Deep recursion in ThreadContainer::flush()");
    CHECK_RET(m_threadable != 0, "No threadable in ThreadContainer::flush()");
    m_threadable->setChild(m_child == 0 ? 0 : m_child->getThreadable());
@@ -895,5 +898,5 @@
 {
    static size_t depth = 0;
-   CHECK_RET(depth < 1000, "Deep recursion in ThreadContainer::destroy()");
+   CHECK_RET(depth < MAX_THREAD_DEPTH, "Deep recursion in 
+ThreadContainer::destroy()");
    if (m_child != 0)
    {
@@ -1683,5 +1686,5 @@
 {
    static size_t depth = 0;
-   VERIFY(depth < 1000, "Deep recursion in Threader::collectSubjects()");
+   ASSERT_MSG(depth < MAX_THREAD_DEPTH, "Deep recursion in 
+Threader::collectSubjects()");
    size_t count = 0;
    ThreadContainer *c;
@@ -1762,5 +1765,5 @@
 {
    static size_t depth = 0;
-   CHECK_RET(depth < 1000, "Deep recursion in Threader::breakThreads()");
+   CHECK_RET(depth < MAX_THREAD_DEPTH, "Deep recursion in Threader::breakThreads()");
 
    // Dummies should have been built


_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to