diff --git a/src/bin/desklink/VolumeControl.cpp b/src/bin/desklink/VolumeControl.cpp index 8983830885..db2e1a41da 100644 --- a/src/bin/desklink/VolumeControl.cpp +++ b/src/bin/desklink/VolumeControl.cpp @@ -300,33 +300,33 @@ VolumeControl::MessageReceived(BMessage* msg) if (msg->FindString("be:signature", &signature) != B_OK) break; - bool isMediaServer = !strcmp(signature, kMediaServerSignature); - bool isAddOnServer = !strcmp(signature, kAddOnServerSignature); - if (isMediaServer) - fMediaServerRunning = msg->what == B_SOME_APP_LAUNCHED; - if (isAddOnServer) - fAddOnServerRunning = msg->what == B_SOME_APP_LAUNCHED; + bool isMediaServer = !strcmp(signature, kMediaServerSignature); + bool isAddOnServer = !strcmp(signature, kAddOnServerSignature); + if (isMediaServer) + fMediaServerRunning = msg->what == B_SOME_APP_LAUNCHED; + if (isAddOnServer) + fAddOnServerRunning = msg->what == B_SOME_APP_LAUNCHED; - if (isMediaServer || isAddOnServer) { - if (!fMediaServerRunning && !fAddOnServerRunning) { + if (isMediaServer || isAddOnServer) { + if (!fMediaServerRunning && !fAddOnServerRunning) { // No media server around SetLabel(B_TRANSLATE("No media server running")); SetEnabled(false); - } else if (fMediaServerRunning && fAddOnServerRunning) { - // HACK! - // quit our now invalid instance of the media roster - // so that before new nodes are created, - // we get a new roster - BMediaRoster* roster = BMediaRoster::CurrentRoster(); - if (roster != NULL) { - roster->Lock(); - roster->Quit(); - } + } else if (fMediaServerRunning && fAddOnServerRunning) { + // HACK! + // quit our now invalid instance of the media roster + // so that before new nodes are created, + // we get a new roster + BMediaRoster* roster = BMediaRoster::CurrentRoster(); + if (roster != NULL) { + roster->Lock(); + roster->Quit(); + } BMessage reconnect(kMsgReconnectVolume); BMessageRunner::StartSending(this, &reconnect, 1000000LL, 1); fConnectRetries = 3; - } + } } break; }