mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 805724 - patch 1: made BluetoothOppManager listen again after disconnection, r=qdot
This commit is contained in:
parent
d99a8a8cca
commit
6c0d16f800
@ -162,6 +162,7 @@ BluetoothOppManager::BluetoothOppManager() : mConnected(false)
|
||||
, mWaitingForConfirmationFlag(false)
|
||||
{
|
||||
mConnectedDeviceAddress.AssignLiteral("00:00:00:00:00:00");
|
||||
mSocketStatus = GetConnectionStatus();
|
||||
}
|
||||
|
||||
BluetoothOppManager::~BluetoothOppManager()
|
||||
@ -244,6 +245,8 @@ BluetoothOppManager::Listen()
|
||||
true,
|
||||
true,
|
||||
this);
|
||||
mSocketStatus = GetConnectionStatus();
|
||||
|
||||
return NS_FAILED(rv) ? false : true;
|
||||
}
|
||||
|
||||
@ -960,11 +963,16 @@ BluetoothOppManager::OnConnectSuccess()
|
||||
// Cache device address since we can't get socket address when a remote
|
||||
// device disconnect with us.
|
||||
GetSocketAddr(mConnectedDeviceAddress);
|
||||
|
||||
mSocketStatus = GetConnectionStatus();
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothOppManager::OnConnectError()
|
||||
{
|
||||
CloseSocket();
|
||||
mSocketStatus = GetConnectionStatus();
|
||||
Listen();
|
||||
}
|
||||
|
||||
void
|
||||
@ -974,4 +982,8 @@ BluetoothOppManager::OnDisconnect()
|
||||
// closing socket without sending OBEX disconnect request first. So we
|
||||
// call AfterOppDisconnected here to ensure all variables will be cleaned.
|
||||
AfterOppDisconnected();
|
||||
|
||||
if (mSocketStatus == SocketConnectionStatus::SOCKET_CONNECTED) {
|
||||
Listen();
|
||||
}
|
||||
}
|
||||
|
@ -107,6 +107,7 @@ private:
|
||||
bool mPutFinal;
|
||||
bool mWaitingForConfirmationFlag;
|
||||
int mUpdateProgressCounter;
|
||||
enum mozilla::ipc::SocketConnectionStatus mSocketStatus;
|
||||
|
||||
nsCOMPtr<nsIDOMBlob> mBlob;
|
||||
nsCOMPtr<nsIThread> mReadFileThread;
|
||||
|
Loading…
Reference in New Issue
Block a user