mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 05:15:45 +00:00
Bug 941462 - Reply internal error code when getting I/O error from BlueZ, r=gyeh
This commit is contained in:
parent
e6d324a042
commit
c533d73a07
@ -108,6 +108,9 @@ extern bool gBluetoothDebugFlag;
|
||||
#define BLUETOOTH_ADDRESS_NONE "00:00:00:00:00:00"
|
||||
#define BLUETOOTH_ADDRESS_BYTES 6
|
||||
|
||||
// Bluetooth stack internal error, such as I/O error
|
||||
#define ERR_INTERNAL_ERROR "InternalError"
|
||||
|
||||
BEGIN_BLUETOOTH_NAMESPACE
|
||||
|
||||
enum BluetoothSocketType {
|
||||
|
@ -497,6 +497,14 @@ RunDBusCallback(DBusMessage* aMsg, void* aBluetoothReplyRunnable,
|
||||
nsAutoString replyError;
|
||||
BluetoothValue v;
|
||||
aFunc(aMsg, nullptr, v, replyError);
|
||||
|
||||
// Bug 941462. When blueZ replys 'I/O error', we treat it as 'internal error'.
|
||||
// This usually happned when the first pairing request has not yet finished,
|
||||
// the second pairing request issued immediately.
|
||||
if (replyError.EqualsLiteral("I/O error")) {
|
||||
replyError.AssignLiteral(ERR_INTERNAL_ERROR);
|
||||
}
|
||||
|
||||
DispatchBluetoothReply(replyRunnable, v, replyError);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user