Closed Bug 1084342 Opened 10 years ago Closed 10 years ago

[Bluetooth] Prepare |SocketMessageWatcher| for BT daemon

Categories

(Firefox OS Graveyard :: Bluetooth, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.1 S8 (7Nov)

People

(Reporter: tzimmermann, Assigned: tzimmermann)

References

Details

Attachments

(3 files, 2 obsolete files)

|SocketMessageWatcher| should be shared between the backends for Bluedroid and for the Bluetooth daemon.
It's a large patch, but it really only moves code around.
Attachment #8506868 - Flags: review?(shuang)
I take the opportunity to fix this long-standing issue in the code.
Attachment #8506869 - Flags: review?(shuang)
Changes since v1: - rebased onto bug 1074419
Attachment #8506868 - Attachment is obsolete: true
Attachment #8506868 - Flags: review?(shuang)
Attachment #8508537 - Flags: review?(shuang)
Comment on attachment 8506869 [details] [diff] [review] [02] Bug 1084342: Fix receive buffer size in |SocketMessageWatcher| Review of attachment 8506869 [details] [diff] [review]: ----------------------------------------------------------------- Hmm. A bit funny that the original code comes from *****_net_LocalSocketImpl.cpp.
Attachment #8506869 - Flags: review?(shuang) → review+
Comment on attachment 8506870 [details] [diff] [review] [03] Bug 1084342: Copy received ancillary data into |SocketMessageWatcher| Review of attachment 8506870 [details] [diff] [review]: ----------------------------------------------------------------- Which platform did you see unaligned memory access. I'm a little surprised we did not get feedback here.
Attachment #8506870 - Flags: review?(shuang) → review+
> Hmm. A bit funny that the original code comes from > *****_net_LocalSocketImpl.cpp. Dunno. Maybe it got copied from somewhere else. :/ I used 'The Linux Programming Interface' (book), and the man pages for |sendmsg|, |recvmsg| and |cmsg|. It's the correct thing to do, according to these documents.
(In reply to Shawn Huang [:shawnjohnjr] from comment #6) > Comment on attachment 8506870 [details] [diff] [review] > [03] Bug 1084342: Copy received ancillary data into |SocketMessageWatcher| > > Review of attachment 8506870 [details] [diff] [review]: > ----------------------------------------------------------------- > > Which platform did you see unaligned memory access. I'm a little surprised > we did not get feedback here. It's not something I actually saw happening. And at least glibc has extra code to align the ancillary data correctly. But you never know with Android. ;) I remembered the unaligned buffers that get from some Bluedroid drivers, and thought that the same thing could happen here. This patch is actually a safe measure; not a fix for a real bug.
Comment on attachment 8508537 [details] [diff] [review] [01] Bug 1084342: Move |SocketMessageWatcher| to separate file (v2) Review of attachment 8508537 [details] [diff] [review]: ----------------------------------------------------------------- I think this patch doesn't change anything just move around SocketMessageWatcher, so r+, if you tested Bluetooth Socket. Please touch CLOBBER just in case strange compiling error happen.
Attachment #8508537 - Flags: review?(shuang) → review+
Changes since v2: - updated CLOBBER
Attachment #8508537 - Attachment is obsolete: true
Attachment #8512527 - Flags: review+
Please file a bug on the build system for this CLOBBER.
Flags: needinfo?(tzimmermann)
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #12) > Please file a bug on the build system for this CLOBBER. It's just a safety measure.
Flags: needinfo?(tzimmermann)
If you don't need a clobber please don't push one. It kills built times/etc for developers.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: