summaryrefslogtreecommitdiff
path: root/sd/source/ui/remotecontrol
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-06-28 14:45:09 +0200
committerAndrzej Hunt <andrzej.hunt@collabora.com>2014-06-30 07:45:23 +0200
commit580b1890d8985d4248b1d5d783ad379d64e82259 (patch)
tree1f816a0c9b11b70159508942a76d2e9825cf1648 /sd/source/ui/remotecontrol
parentd61468314bbfd2a79929b48e62d7e5ed354ab79b (diff)
Allow removal of remotes even if Server not running.
This is purely config manipulation so shouldn't rely on having the Server actually running (e.g. if disabled, and/or if network setup failed). Change-Id: Ifc6e5639ba6842a18eb0be99387a5f8dd871da06
Diffstat (limited to 'sd/source/ui/remotecontrol')
-rw-r--r--sd/source/ui/remotecontrol/Server.cxx18
1 files changed, 8 insertions, 10 deletions
diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx
index 81335374967a..d80b8463abdc 100644
--- a/sd/source/ui/remotecontrol/Server.cxx
+++ b/sd/source/ui/remotecontrol/Server.cxx
@@ -239,16 +239,16 @@ std::vector< ::boost::shared_ptr< ClientInfo > > RemoteServer::getClients()
{
SAL_INFO( "sdremote", "RemoteServer::getClients() called" );
std::vector< ::boost::shared_ptr< ClientInfo > > aClients;
- if ( !spServer )
+ if ( spServer )
{
- SAL_INFO( "sdremote", "No remote server instance => no clients" );
- return aClients;
+ MutexGuard aGuard( sDataMutex );
+ aClients.assign( spServer->mAvailableClients.begin(),
+ spServer->mAvailableClients.end() );
+ }
+ else
+ {
+ SAL_INFO( "sdremote", "No remote server instance => no remote clients" );
}
-
- MutexGuard aGuard( sDataMutex );
- aClients.assign( spServer->mAvailableClients.begin(),
- spServer->mAvailableClients.end() );
-
// We also need to provide authorised clients (no matter whether or not
// they are actually available), so that they can be de-authorised if
// necessary. We specifically want these to be at the end of the list
@@ -342,8 +342,6 @@ void RemoteServer::deauthoriseClient( ::boost::shared_ptr< ClientInfo > pClient
// the UI.
SAL_INFO( "sdremote", "RemoteServer::deauthoriseClient called" );
- if ( !spServer )
- return;
if ( !pClient->mbIsAlreadyAuthorised )
// We can't remove unauthorised clients from the authorised list...