Chromium Code Reviews| Index: chromeos/dbus/bluetooth_media_transport_client.cc |
| diff --git a/chromeos/dbus/bluetooth_media_transport_client.cc b/chromeos/dbus/bluetooth_media_transport_client.cc |
| index 2be8a5639efa46f7f140eb62af71d1f91a0db2ad..e8b06ee3e750d9f596bbc58f7edfae34a64431a1 100644 |
| --- a/chromeos/dbus/bluetooth_media_transport_client.cc |
| +++ b/chromeos/dbus/bluetooth_media_transport_client.cc |
| @@ -241,7 +241,16 @@ class BluetoothMediaTransportClientImpl |
| if (reader.PopFileDescriptor(&fd) && |
| reader.PopUint16(&read_mtu) && |
| reader.PopUint16(&write_mtu)) { |
| - callback.Run(fd, read_mtu, write_mtu); |
| + fd.CheckValidity(); |
| + DCHECK(fd.is_valid()); |
| + |
| + VLOG(1) << "OnAcquireSuccess - fd: "<< fd.value() |
| + <<", read MTU: " << read_mtu |
| + <<", write MTU: " << write_mtu; |
| + |
| + // The ownership of the file descriptor is transferred to the user |
| + // application. |
| + callback.Run(fd.TakeValue(), read_mtu, write_mtu); |
|
armansito
2015/03/12 03:42:54
You don't want to do this here, I would leave it u
Miao
2015/03/12 22:33:31
Done.
|
| return; |
| } |