diff options
Diffstat (limited to 'sd/source/ui/remotecontrol/BluetoothServer.cxx')
-rw-r--r-- | sd/source/ui/remotecontrol/BluetoothServer.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx index b9736a20a746..ad6dadf14a61 100644 --- a/sd/source/ui/remotecontrol/BluetoothServer.cxx +++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx @@ -189,6 +189,10 @@ sal_Int32 OSXBluetoothWrapper::write( const void* pBuffer, sal_uInt32 n ) char* ptr = (char*)pBuffer; sal_uInt32 nBytesWritten = 0; + + if (mpChannel == nil) + return 0; + while( nBytesWritten < n ) { int toWrite = n - nBytesWritten; @@ -222,6 +226,13 @@ void OSXBluetoothWrapper::appendData(void* pBuffer, size_t len) } } +void OSXBluetoothWrapper::channelClosed() +{ + SAL_INFO( "sdremote.bluetooth", "OSXBluetoothWrapper::channelClosed()" ); + + mpChannel = nil; +} + void incomingCallback( void *userRefCon, IOBluetoothUserNotificationRef inRef, IOBluetoothObjectRef objectRef ) |