mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 802080 - Update connected device address, r=qdot
This commit is contained in:
parent
c68613929b
commit
f73dfbb691
@ -161,11 +161,7 @@ BluetoothOppManager::BluetoothOppManager() : mConnected(false)
|
||||
, mPutFinal(false)
|
||||
, mWaitingForConfirmationFlag(false)
|
||||
{
|
||||
// FIXME / Bug 800249:
|
||||
// mConnectedDeviceAddress is Bluetooth address of connected device,
|
||||
// we will be able to get this value after bug 800249 lands. For now,
|
||||
// just assign a fake value to it.
|
||||
mConnectedDeviceAddress.AssignASCII("00:00:00:00:00:00");
|
||||
mConnectedDeviceAddress.AssignLiteral("00:00:00:00:00:00");
|
||||
}
|
||||
|
||||
BluetoothOppManager::~BluetoothOppManager()
|
||||
@ -347,6 +343,8 @@ BluetoothOppManager::AfterOppDisconnected()
|
||||
mReadFileThread->Shutdown();
|
||||
mReadFileThread = nullptr;
|
||||
}
|
||||
|
||||
mConnectedDeviceAddress.AssignLiteral("00:00:00:00:00:00");
|
||||
}
|
||||
|
||||
// Virtual function of class SocketConsumer
|
||||
@ -959,6 +957,9 @@ BluetoothOppManager::ReceivingFileConfirmation(const nsString& aAddress,
|
||||
void
|
||||
BluetoothOppManager::OnConnectSuccess()
|
||||
{
|
||||
// Cache device address since we can't get socket address when a remote
|
||||
// device disconnect with us.
|
||||
GetSocketAddr(mConnectedDeviceAddress);
|
||||
}
|
||||
|
||||
void
|
||||
@ -969,4 +970,8 @@ BluetoothOppManager::OnConnectError()
|
||||
void
|
||||
BluetoothOppManager::OnDisconnect()
|
||||
{
|
||||
// It is valid for a bluetooth device which is transfering file via OPP
|
||||
// closing socket without sending OBEX disconnect request first. So we
|
||||
// call AfterOppDisconnected here to ensure all variables will be cleaned.
|
||||
AfterOppDisconnected();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user