History log of /system/core/include/sysutils/SocketClient.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4520246d3534c087f3e9253c34f99dd1e45b7bd7 28-Sep-2011 Xianzhu Wang <wangxianzhu@google.com> Fix SocketListener socket leak issue.

The problem was: if a socket is shared between SocketListener and another
thread, only if the last reference is removed by SocketListener can the socket
be closed, otherwise the socket will leak. This sometimes happens in netd's
dnsproxyd.

This change let the SocketClient own the socket and close the socket when
the SocketClient is destructed.

Change-Id: I2865fbfe9ee4d8b3e43d7e02919dbb2d261f70de
/system/core/include/sysutils/SocketClient.h
4be4e69f0128b7d9b0a29651ef4b79d806ae3ce7 18-Mar-2011 Brad Fitzpatrick <bradfitz@android.com> Fix potential race introduced in Icd7f5f03

Digit wrote:

"You probably don't want to close the socket here without updating
c->socket as well. Otherwise, another thread holding a handle to the
client after the c->decRef() could end up sending a message to a
different socket, if the file descriptor index is reused by another
client in the meantime."

Change-Id: Icdefb5ffc0c7607325d7db761e1f04e5d868bfb7
/system/core/include/sysutils/SocketClient.h
648ebad883e7825353c841950dd7d78664c238e6 17-Mar-2011 Brad Fitzpatrick <bradfitz@android.com> SocketClient: add optional reference counting

Needed to fix a race in netd.

Bug: 3438459
Change-Id: Icd7f5f035510235f733a25c0621479d3e644b152
/system/core/include/sysutils/SocketClient.h
8c5669f9f9a228efebf4059fd4ceace5cece578b 27-Oct-2010 Brad Fitzpatrick <bradfitz@android.com> Let SocketClient users write binary data to clients.

This is a dependency for the DNS proxy CLs.

This CL also adds a new socket for the netd process to inherit which
is owned by the inet group. (so only apps with the INTERNET
permission can use the DNS proxy...)

Change-Id: Ic3475c697913ba85805b4e49801b65e7a1d59289
/system/core/include/sysutils/SocketClient.h
30abb7234de2a9caa1add4b00a189436f0b24560 14-Sep-2010 Kenny Root <kroot@google.com> Fetch peer credentials for local sockets

Fetch the PID, UID, and GID of the remote side of a local socket
connection in case any users of this library class want to check it.

Change-Id: Ia3230e6bc68ab6f93160df9f5996d2bf744b872c
/system/core/include/sysutils/SocketClient.h
db017545796747115b8797f03e662b0f398a7c7b 21-May-2009 San Mehat <san@google.com> libsysutils: const correctness fixes + remove some debugging

Signed-off-by: San Mehat <san@google.com>
/system/core/include/sysutils/SocketClient.h
d768066ef54270a0d3ccfccd50ae8238db5a2cdd 12-May-2009 San Mehat <san@google.com> libsysutils: Tweak SocketListener and friends

Signed-off-by: San Mehat <san@google.com>
/system/core/include/sysutils/SocketClient.h
fa644ffe944c01a9b00f8d7676d58394fabee285 08-May-2009 San Mehat <san@google.com> libsysutils: Add multiple client support and fix some bugs
/system/core/include/sysutils/SocketClient.h