Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 298595 Details for
Bug 393121
app-cdr/kcdemu-0.3.1 doesn't work with app-cdr/cdemud-1.4.0
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
kcdemu-0.3.1-start-cdemud.patch
kcdemu-0.3.1-start-cdemud.patch (text/plain), 2.75 KB, created by
Alexandre Rostovtsev (RETIRED)
on 2012-01-11 04:38:29 UTC
(
hide
)
Description:
kcdemu-0.3.1-start-cdemud.patch
Filename:
MIME Type:
Creator:
Alexandre Rostovtsev (RETIRED)
Created:
2012-01-11 04:38:29 UTC
Size:
2.75 KB
patch
obsolete
>From 67dd8c1b09af3342fba2fefcd0cb4e51adbf46af Mon Sep 17 00:00:00 2001 >From: Alexandre Rostovtsev <tetromino@gentoo.org> >Date: Tue, 10 Jan 2012 23:29:23 -0500 >Subject: [PATCH] Try to start the daemon if it's not already running > >Fixes compatibility with cdemud-1.4.0, see >https://bugs.gentoo.org/show_bug.cgi?id=393121 >--- > src/cdemu.cpp | 34 ++++++++++++++++++++++++---------- > src/cdemu.h | 1 + > 2 files changed, 25 insertions(+), 10 deletions(-) > >diff --git a/src/cdemu.cpp b/src/cdemu.cpp >index 3fe18c2..c4750b0 100644 >--- a/src/cdemu.cpp >+++ b/src/cdemu.cpp >@@ -181,30 +181,44 @@ void CDEmu::connectSlots(QDBusConnection *connection) > } > > >-void CDEmu::findCurrentBus() >+void CDEmu::findCurrentBusHelper(bool start_daemon) > { >- // We don't want to get signals from the wrong bus in case we >- // switch from the session bus to the system bus or vice versa >- if (m_currentBus) >- { >- m_currentBus->disconnect("net.sf.cdemu.CDEMUD_Daemon", "/CDEMUD_Daemon", >- "net.sf.cdemu.CDEMUD_Daemon", "DeviceStatusChanged", >- this, SLOT(slotDeviceChanged(int))); >- } >- > // Try session bus first > QDBusConnectionInterface *interface = m_sessionBus.interface(); >+ if (start_daemon) >+ interface->startService("net.sf.cdemu.CDEMUD_Daemon"); > if (interface->isServiceRegistered("net.sf.cdemu.CDEMUD_Daemon")) > m_currentBus = &m_sessionBus; > else > { > // Try system bus then > interface = m_systemBus.interface(); >+ if (start_daemon) >+ interface->startService("net.sf.cdemu.CDEMUD_Daemon"); > if (interface->isServiceRegistered("net.sf.cdemu.CDEMUD_Daemon")) > m_currentBus = &m_systemBus; > else > m_currentBus = 0; > } >+} >+ >+ >+void CDEmu::findCurrentBus() >+{ >+ // We don't want to get signals from the wrong bus in case we >+ // switch from the session bus to the system bus or vice versa >+ if (m_currentBus) >+ { >+ m_currentBus->disconnect("net.sf.cdemu.CDEMUD_Daemon", "/CDEMUD_Daemon", >+ "net.sf.cdemu.CDEMUD_Daemon", "DeviceStatusChanged", >+ this, SLOT(slotDeviceChanged(int))); >+ } >+ >+ // Let's see if the daemon is already started >+ findCurrentBusHelper(false); >+ // If it's not started, try to start it >+ if (!m_currentBus) >+ findCurrentBusHelper(true); > > // Reconnect > if (m_currentBus) >diff --git a/src/cdemu.h b/src/cdemu.h >index c7b0655..14a9c67 100644 >--- a/src/cdemu.h >+++ b/src/cdemu.h >@@ -56,6 +56,7 @@ private: > ~CDEmu(); > > void connectSlots(QDBusConnection *connection); >+ void findCurrentBusHelper(bool start_daemon); > void findCurrentBus(); > int nextFreeSlot(); > >-- >1.7.8.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 393121
:
298595
|
298605