Ticket #1603: event-locking-0.19.diff
File event-locking-0.19.diff, 3.0 KB (added by , 18 years ago) |
---|
-
libs/libmythtv/siparser.cpp
old new 206 206 case EVENTS: 207 207 while (Table[EVENTS]->GetEmitID(key0,key1)) 208 208 { 209 QMutexLocker lock (&(((EventHandler*) Table[EVENTS])->EventsLock)); 209 210 EventHandler *hdl = (EventHandler*) Table[EVENTS]; 210 211 emit EventsReady(&(hdl->Events[key0])); 211 212 } … … 1488 1489 } 1489 1490 #endif 1490 1491 1492 QMutexLocker lock (&(((EventHandler*) Table[EVENTS])->EventsLock)); 1491 1493 QMap2D_Events &events = ((EventHandler*) Table[EVENTS])->Events; 1492 1494 events[head->table_id_ext][event.EventID] = event; 1493 1495 pos += descriptors_length; … … 2487 2489 pos += (descriptors_length + 2); 2488 2490 EITFixUp(e); 2489 2491 2492 QMutexLocker lock (&(((EventHandler*) Table[EVENTS])->EventsLock)); 2490 2493 EventHandler *eh = (EventHandler*) Table[EVENTS]; 2491 2494 eh->Events[head->table_id_ext][event_id] = e; 2492 2495 } … … 2509 2512 if (!atsc_src_id) 2510 2513 return; 2511 2514 2515 QMutexLocker lock (&(((EventHandler*) Table[EVENTS])->EventsLock)); 2512 2516 EventHandler *eh = (EventHandler*) Table[EVENTS]; 2513 2517 if (eh->Events[source_id].contains(etm_id2) && 2514 2518 eh->Events[source_id][etm_id2].ETM_Location) -
libs/libmythtv/sitypes.cpp
old new 884 884 } 885 885 if (AllComplete && (SIStandard == SI_STANDARD_ATSC)) 886 886 { 887 QMutexLocker lock(&EventsLock); 887 888 for (e = Events[s.key()].begin() ; e != Events[s.key()].end() ; ++e) 888 889 { 889 890 if (e.data().ETM_Location != 0) … … 946 947 947 948 if (AllComplete && (SIStandard == SI_STANDARD_ATSC)) 948 949 { 950 QMutexLocker lock(&EventsLock); 949 951 for (e = Events[s.key()].begin() ; e != Events[s.key()].end() ; ++e) 950 952 { 951 953 if (e.data().ETM_Location != 0) -
libs/libmythtv/sitypes.h
old new 12 12 #include <qmap.h> 13 13 #include <qstringlist.h> 14 14 #include <qdatetime.h> 15 #include <qmutex.h> 15 16 16 17 #include "config.h" 17 18 #ifdef HAVE_STDINT_H … … 612 613 QMap_pidHandler ETTpid; 613 614 QMap2D_Events Events; 614 615 QMap_bool TrackerSetup; 616 QMutex EventsLock; 615 617 }; 616 618 617 619 class ServiceHandler : public TableHandler