Commit Graph

39 Commits

Author SHA1 Message Date
Kyle Huey
b4a33be80b Bug 991812: Remove uses of AtomicRefCounted<T> that live in Gecko. r=ehsan 2014-04-14 12:04:25 -07:00
Ryan VanderMeulen
5aa07e1977 Backed out changesets ddbac34527fe and fa82f32d0c39 (bug 991812) for B2G bustage.
CLOSED TREE
2014-04-14 16:16:18 -04:00
Kyle Huey
ce170fee49 Bug 991812: Remove uses of AtomicRefCounted<T> that live in Gecko. r=ehsan 2014-04-14 12:04:25 -07:00
Thomas Zimmermann
c0d3f0da44 Bug 981239: Use atomic ref-counting for |UnixSocketConsumer|, r=kyle
|SocketSendTask| acquires a reference to |UnixSocketConsumer| on
the main thread and releases this reference on the I/O thread;
leading to race-conditions. This patch adds

  - atomicity for ref-counting of |UnixSocketConsumer|, and
  - stricter tests in the destructor of this class.
2014-04-08 09:27:47 +02:00
Ben Tian
b404c5bb56 Bug 979668 - [Bluetooth] Sender name is not shown in transfer requests, f=tzimmermann, r=kyle 2014-03-10 10:11:27 +08:00
Ehsan Akhgari
c356429b5a Bug 935778 - Part 0.4: Spray even more MOZ_DECLARE_REFCOUNTED_TYPENAME across the tree 2014-02-21 09:11:33 -05:00
Thomas Zimmermann
f70e362447 Bug 972265: Maintain connect delay in UnixSocketConsumer, r=kyle
UnixSocketConsumer now maintains a delay for re-establishing closed
connection. The initial delay is zero, so that the first connect call
is processed immediately. At the first failed attempt to connect, the
delay is set to ~1 second, and is increased by a factor of 2 on each
successive error until it reaches ~1 minute.

The UnixSocketConsumer code resets the delay to zero if it is lower
than the time that the connection was open. This heuristics protects
against cases where the peer establishes a connection, and closes it
shortly afterwards. Incompatible versions of rild show this behavior.
2014-02-14 08:03:05 +01:00
Thomas Zimmermann
80ad75a960 Bug 936402: Duplicate connection status in UnixSocketImpl, r=bent
UnixSocketImpl, which mostly runs on the I/O thread, doesn't control
its reference to UnixSocketConsumer. If the connection status is
stored in UnixSocketConsumer, the I/O thread can't read it safely.

This patch duplicates the connection status in UnixSocketImpl, where
reading from the I/O thread is safe. Methods of UnixSocketImpl don't
need to access mConsumer any longer to obtain the connection status.
2013-12-09 14:21:18 +01:00
Chuck Lee
f3813df219 Bug 928223 - 0001. Add function to perform setup for listen socket. r=qDot echou vicamo yoshi 2013-10-25 10:00:22 +08:00
Shawn Huang
12ce9e4290 Bug 880610: Part2-Add build flag in UnixSocket to distinguish between bluez and bluedroid stack, r=echou 2013-10-23 14:12:24 +08:00
Eric Chou
5ad4e9af3a Backed out changeset 089f015f15bb and e907ab075ec8 (bug 880610) for hitting MOZ_ASSERT 2013-10-19 16:01:25 +08:00
Shawn Huang
f4cd28b6bb Bug 880610: Part2-Add build flag in UnixSocket to distinguish between bluez and bluedroid stack. r=echou 2013-10-17 18:25:55 +08:00
Thomas Zimmermann
fafde04f8a Bug 912996: Remove memcpy when reading from Unix socket, r=qdot
We used to allocate memory on the stack when reading from a file
descriptor and copied the result into an instance of UnixSocketRawData.

This patch

 - cleans up the interface of UnixSocketRawData,
 - removes the large stack allocation (64KiB), and
 - removes the unnecessary memcpy.

Other memcpys for sending data have been moved into the constructor
of UnixSocketRawData.
2013-09-06 10:18:35 +02:00
Thomas Zimmermann
96038c5a38 Bug 912996: Fix whitespaces, r=qdot 2013-09-06 10:17:55 +02:00
Eric Chou
79edcf6483 Bug 823803 - Add L2CAP/EL2CAP Socket support, r=qdot, r=gyeh
This version of BlueZ from Code Aurora has added GOEP_PSM to Object
Push Profile service record, which means that remote devices may
connect with us via both L2CAP and RFCOMM. This patch completes
L2CAP/EL2CAP socket implementation.
2013-04-12 18:45:37 +08:00
Eric Chou
425d3892d6 Bug 851046: Patch 2 - New Class: BluetoothSocket; r=mrbkap 2013-04-04 17:52:12 -07:00
Matt Brubeck
b7dabb3866 Back out bug 851046 because of rebase problems 2013-04-04 17:45:06 -07:00
Eric Chou
e85ac36770 Bug 851046: Patch 2 - New Class: BluetoothSocket; r=mrbkap 2013-04-04 17:25:44 -07:00
Ryan VanderMeulen
c906a315ce Backed out 9 changesets (bug 851046) for B2G bustage on a CLOSED TREE. 2013-04-03 15:54:36 -04:00
Eric Chou
e3001a3423 Bug 851046 - New class: BluetoothSocket. r=mrbkap
After this new class is landed, communicating with other devices on
profile level should become more intuitive and reasonable. Each
Bluetooth*Manager doesn't need to inherit UnixSocketConsumer, instead,
BluetoothSocket inherits UnixSocketConsumer. That makes Bluetooth*Manager
be able to have more than 1 Bluetooth connections at a time with different
remote devices.
2013-02-26 11:16:36 +08:00
Vicamo Yang
dd342d538d Bug 854904: fix undefined sockaddr_in, sockaddr_in6. r=qDot 2013-03-27 20:53:24 +08:00
Kyle Machulis
7727c9d17d Bug 843868: Change sockaddr* to be a union of all possible sockaddr types; r=tzimmermann 2013-03-19 10:23:47 -07:00
Phil Ringnalda
55ae766272 Back out b21345c5027c (bug 843868) for build bustage
CLOSED TREE
2013-03-15 21:35:25 -07:00
Kyle Machulis
aac2cecd73 Bug 843868 - Change sockaddr* to be a union of all possible sockaddr types; r=tzimmermann 2013-03-15 21:10:40 -07:00
Blake Kaplan
2edd0bd68d Bug 846615 - Re-implement UnixSocket's shutdown sequence to avoid running any code on deleted UnixSocketImpls, r=bent 2013-03-08 15:03:03 +08:00
Vicamo Yang
0399c4e3a0 Bug 826931 - Part 2/3: UnixSocket - allow delayed connection. r=qDot 2013-02-01 20:28:18 +08:00
Vicamo Yang
397e642605 Bug 826931 - Part 1/3: UnixSocket - allow ownership take-over in ReceiveSocketData(). r=qDot,echou 2013-02-01 20:28:15 +08:00
Kyle Machulis
d3f01c9b65 Bug 811683 - Changed UnixSocketRawData to take variable sizes up to 64k, r=cjones 2012-12-20 18:36:55 +08:00
Gina Yeh
e76ef0a220 Bug 804436 - Patch 1 : Add listening status to UnixSocket, r=gyeh 2012-10-26 17:28:34 +08:00
Kyle Machulis
c838b00979 Bug 800249 - Patch 2: Add ability to retreive connected socket address as a string; r=cjones 2012-10-17 17:11:05 -07:00
Kyle Machulis
863d03fc7d Bug 800249 - Patch 1: Add ability to store/retrieve address to UnixSocket; r=cjones 2012-10-17 17:10:27 -07:00
Kyle Machulis
ce973a704b Bug 800247: Add disconnect events to UnixSocket, update Bluetooth*Manager; r=echou r=cjones 2012-10-12 11:38:14 -07:00
Kyle Machulis
f28e7f6e44 Bug 796176 - Patch 1: UnixSocket changes to get connect/listen running main thread, connect status to consumers; r=cjones 2012-10-10 22:48:40 -07:00
Kyle Machulis
c84dfbb2a5 Bug 796184 - Revert UnixSocketImpl to a bare pointer, make Bluetooth*Managers use CloseSocket; r=cjones r=gyeh 2012-10-05 16:05:35 -07:00
Kyle Machulis
dc3e3c87a5 Bug 790739: Patch 1 - UnixSocket changes for server sockets; r=cjones 2012-10-01 00:03:16 -07:00
Kyle Machulis
cd306b0e65 Backing out e8e7e0cf43d8 (Bug 790739) due to bustage 2012-09-30 23:17:46 -07:00
Kyle Machulis
6b924d656a Bug 790739: Patch 1 - UnixSocket changes for server sockets; r=cjones 2012-09-30 22:54:27 -07:00
Kyle Machulis
215a8023d6 Bug 776182: Patch 3 - Socket I/O for ipc unix sockets; r=cjones r=echou 2012-09-25 13:13:15 -07:00
Kyle Machulis
242f67db8e Bug 776182: Patch 2 - Move Socket.* to UnixSocket.*; r=cjones 2012-09-25 12:32:09 -07:00