Diffstat (limited to 'noncore/net/opietooth/applet/bluezapplet.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/applet/bluezapplet.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/noncore/net/opietooth/applet/bluezapplet.cpp b/noncore/net/opietooth/applet/bluezapplet.cpp index 90b0c6d..6351d4e 100644 --- a/noncore/net/opietooth/applet/bluezapplet.cpp +++ b/noncore/net/opietooth/applet/bluezapplet.cpp @@ -117,5 +117,5 @@ namespace OpieTooth { } - int BluezApplet::setBluezStatus(int c) { + int BluezApplet::setBluezStatus(int c, bool sync) { if ( c == 1 ) { @@ -139,6 +139,10 @@ namespace OpieTooth { break; } - QCopEnvelope e("QPE/System", "execute(QString)"); - e << QString("/etc/init.d/bluetooth start"); + if (sync) { + ::system("/etc/init.d/bluetooth start >/dev/null 2>/dev/null"); + } else { + QCopEnvelope e("QPE/System", "execute(QString)"); + e << QString("/etc/init.d/bluetooth start"); + } } else { ::system("/etc/init.d/bluetooth stop >/dev/null 2>/dev/null"); @@ -170,5 +174,5 @@ namespace OpieTooth { m_wasOn = checkBluezStatus(); if (!m_wasOn) { - setBluezStatus(1); + setBluezStatus(1, true); sleep(2); } |