[mythtv-commits] Ticket #11364: Possible non-thread-safe call to MythCoreContext::ConnectToMasterServer

MythTV noreply at mythtv.org
Sun Jan 20 12:07:47 UTC 2013


#11364: Possible non-thread-safe call to MythCoreContext::ConnectToMasterServer
-------------------------+--------------------------------------
 Reporter:  peper03@…    |           Type:  Bug Report - General
   Status:  new          |       Priority:  minor
Milestone:  unknown      |      Component:  MythTV - General
  Version:  Master Head  |       Severity:  medium
 Keywords:               |  Ticket locked:  0
-------------------------+--------------------------------------
 IdleScreen::CheckConnectionToServer in MythFrontend calls
 MythCoreContext::ConnectToMasterServer, which has the following comment:

 // Assumes that either m_sockLock is held, or the app is still single
 // threaded (i.e. during startup).

 As m_sockLock cannot be accessed outside of MythCoreContext and
 IdleScreen::CheckConnectionToServer is triggered by a timer (i.e. not only
 at startup), it would appear that this call is not thread-safe.

 The second patch (Added-SafeConnectToMasterServer.diff​) in ticket #11238
 provides a thread-safe wrapper, which could be called instead.

-- 
Ticket URL: <http://code.mythtv.org/trac/ticket/11364>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center


More information about the mythtv-commits mailing list