[mythtv-commits] mythtv commit: r16233 by danielk

mythtv at cvs.mythtv.org mythtv at cvs.mythtv.org
Sun Feb 24 15:52:35 UTC 2008


      Author: danielk
        Date: 2008-02-24 15:52:35 +0000 (Sun, 24 Feb 2008)
New Revision: 16233
   Changeset: http://cvs.mythtv.org/trac/changeset/16233

Added:

   branches/release-0-21-fixes/mythtv/libs/libmyth/mythevent.cpp

Modified:

   branches/release-0-21-fixes/mythtv/libs/libmyth/libmyth.pro
   branches/release-0-21-fixes/mythtv/libs/libmyth/mythcontext.h
   branches/release-0-21-fixes/mythtv/libs/libmyth/mythevent.h

Log:

Fix to allow MythEvent with extradata to be used safely.

MythEvent was making a safe copy of the message but not the extradata before using a copy in another thread. This fixes that problem and also moves some of the implementation from the mythevent.h to mythevent.cpp. This also makes sure that if you use the int constructor message and extradata are explicitly initialized in the constructor, and that the ExtraData(int) method does not segfault on a bad index value.

NOTE: MythEvent itself is still not threadsafe nor reenterant, but it is now safe to create a MythEvent or the strings used to initialize it in a thread other than the Qt thread (and then use it in any one thread at a time).

Unfortunately this requires a binary revision bump, so plugins will have to be recompiled, I also recommend a 'make distclean' for mythtv itself.




More information about the mythtv-commits mailing list