[mythtv] Mythfrontend hang with CVS
Leo Weppelman
leo at wau.mis.ah.nl
Wed Jun 9 09:04:28 EDT 2004
On Wed, Jun 09, 2004 at 02:26:34PM +0200, Leo Weppelman wrote:
> On Tue, Jun 08, 2004 at 06:11:24PM -0500, Stacey Son wrote:
> > OK, Looking at the 0.15 release code the loop was introduced by a change
> > in MythCDROM::openDevice():
> >
> > In 0.15 release:
> >
> > MythCDROM::openDevice()
> > {
> > if (MythMediaDevice::openDevice())
> > {
> > ...
> > if (m_AllowEject)
> > ioctl(m_DeviceHandle, CDROM_LOCKDOOR, 0);
> >
> > was changed to:
> >
> > MythCDROM::openDevice()
> > {
> > if (MythMediaDevice::openDevice())
> > {
> > ...
> > if (m_AllowEject)
> > unlock();
> >
> > Your patch should fix the looping problem but I don't see right off why
> > it is not sensing media changes now. You could try changing the above
> > back and see if that, for some reason, fixes this.
>
> Yes, putting back de ioctl makes myht see the media changes again... I
> haven't figured out why yet.
I think I've got it! The ioct() -> unlock() change caused the following
calltree on opening the device:
MythCDROM::openDevice()
MythMediaDevice::openDevice()) {
MythCDROMLinux::unlock {
m_DeviceHandle, CDROM_LOCKDOOR, 0)
MythMediaDevice::unlock {
MythMediaDevice::closeDevice() <----- !!!!!
}
}
}
}
Notice that open reports that it successfully opened the device while by
calling unlock() it indirectly closed the device right after opening it :-(
Leo.
More information about the mythtv-dev
mailing list