Ticket #12219: 0001-Attempt-to-fix-segfault-in-EITCache-assumed-to-be-du.patch

File 0001-Attempt-to-fix-segfault-in-EITCache-assumed-to-be-du.patch, 1.0 KB (added by Karl Egly, 7 years ago)

Potential fix for testing

  • mythtv/libs/libmythtv/eitcache.cpp

    From c2bbc11dd7fecefd361acf8e221db1173b2daad8 Mon Sep 17 00:00:00 2001
    From: Karl Dietz <dekarl@mythtv.org>
    Date: Wed, 23 Jul 2014 11:15:24 +0200
    Subject: [PATCH 1/4] Attempt to fix segfault in EITCache assumed to be due to
     QMap race
    
    Refs #12219
    ---
     mythtv/libs/libmythtv/eitcache.cpp |    4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/mythtv/libs/libmythtv/eitcache.cpp b/mythtv/libs/libmythtv/eitcache.cpp
    index c087d9c..ae7c98d 100644
    a b void EITCache::WriteChannelToDB(QStringList &value_clauses, uint chanid) 
    274274                updated++;
    275275                *it &= ~(uint64_t)0 >> 1; // mark as synced
    276276            }
     277            ++it;
    277278        }
    278279        else
    279280        {
    280281            // Event is too old; remove from eit cache in memory
    281             eventMap->remove(it.key());
     282            it = eventMap->erase(it);
    282283            removed++;
    283284        }
    284         ++it;
    285285    }
    286286    unlock_channel(chanid, updated);
    287287