History log of /system/core/libsysutils/src/SocketClient.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
544a7f7a36cb9434505fe5cdc9e79d16937ac23f 01-Apr-2013 Hong-Mei Li <a21834@motorola.com> libsysutils: fix null pointer and memory leak issue

In SocketClient::quoteArg function
1. Fix potential null pointer accessing issue
2. Fix potential memory leak introduced by realloc fail

Change-Id: I1ca0f9089290d43452e9a71428244545f4ed866b
Signed-off-by: Hong-Mei Li <a21834@motorola.com>
/system/core/libsysutils/src/SocketClient.cpp
6f523cda13094bf493cdf37e7ecc480bb5a37a2b 31-May-2012 Robert Greenwalt <rgreenwalt@google.com> am 7bb1b958: am ff856a2b: Merge "Add error handling to SocketClient::sendData"

* commit '7bb1b9585d2d61beaf05c997971aee27f87ad3f7':
Add error handling to SocketClient::sendData
2e5fcd08ac177e984ebf1fb05bab5dfcf296c5a4 13-May-2011 Mattias Falk <mattias.falk@sonyericsson.com> Add error handling to SocketClient::sendData

Return failure and set errno if mSocket isn't valid.

Change-Id: I579114d435db46d0bb5682167ef34bebe061a8f8
/system/core/libsysutils/src/SocketClient.cpp
594947793c98e8e7f58f0e9b2cb962c9ef23adeb 21-Apr-2012 Robert Greenwalt <rgreenwalt@google.com> Add ability to quote responses as needed.

It's up to the protocol to know when quotes are required. In the future
the response should probably all be binary blobs with lengths.

bug:6353048
Change-Id: I3f9b48ab0f4e6746d75cdc9c0c84d33f38f63661
/system/core/libsysutils/src/SocketClient.cpp
6ac770fc52595b8230c3286d7707c85b003aeac1 12-Mar-2012 Selim Gurun <sgurun@google.com> Do not generate SIGPIPE errors in SocketCLient.

This change is to make sure the users of library does not crash
if they are not handling SIGPIPE properly.

Change-Id: I4ea80d6bfc26a4bca6b901959ae3060b059d46d3
/system/core/libsysutils/src/SocketClient.cpp
7599bfcf13cf022333338b7a87aaddae69c48d73 09-Mar-2012 Robert Greenwalt <rgreenwalt@google.com> Fix pointer arith.

Sending 3digit code, null, binary-length and data. Current code sends
3digit code, space, null, binary-length, binary-data.

The space should not be sent.

Change-Id: I1df00a3e70805b39b6105966c7f3c613461a6858
/system/core/libsysutils/src/SocketClient.cpp
7bf4c45f842ded6d6ad6b2d80e052ddf56969723 28-Feb-2012 Selim Gurun <sgurun@google.com> Add a utility function to send a code + binary msg

Add a utility function to SocketClient to send a c-string code
prepended to a binary message. This is necessary to be able to
send a binary message while keeping compatible with underlying
text-based protocol.

Change-Id: Ifc6562003a687577d7deb50260533a5147ae4f97
/system/core/libsysutils/src/SocketClient.cpp
8702bb17f40022e970e8acd40b348d074e39afc7 07-Feb-2012 Robert Greenwalt <rgreenwalt@google.com> New NativeDaemonConnector protocol adds a seqnum.

Allows for one socket to be multiplexed for multiple requests.
Doesn't use command sequence numbers for broadcasts - would make no sense.
Doesn't alter current default behavior so OEM's using these classes
won't notice a difference.
bug:5864209

Change-Id: Ie3b19c4f81eea868569229a365c8cb7de249c2dd
/system/core/libsysutils/src/SocketClient.cpp
a8185a622e368d1957e18a3ee9d29d45eda12cfc 08-Feb-2012 Guang Zhu <guangzhu@google.com> Revert "New NativeDaemonConnector protocol adds a seqnum."

Reverting because it seems to break `adb reboot`

This reverts commit dc58e73071aa829a5038caf37211f6b3e2d7b275.

Change-Id: Ib8cc4379254694398cbb7f3e7a64c20e1ed8c1ba
/system/core/libsysutils/src/SocketClient.cpp
dc58e73071aa829a5038caf37211f6b3e2d7b275 07-Feb-2012 Robert Greenwalt <rgreenwalt@google.com> New NativeDaemonConnector protocol adds a seqnum.

Allows for one socket to be multiplexed for multiple requests.
bug:5864209

Change-Id: I934c88da25d95e093371f455442bdf2f0ed7a4f4
/system/core/libsysutils/src/SocketClient.cpp
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/libsysutils/src/SocketClient.cpp
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/libsysutils/src/SocketClient.cpp
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/libsysutils/src/SocketClient.cpp
af61509b50bc110b0c7c4691e37873cc0987ab5c 17-Jan-2011 David 'Digit' Turner <digit@google.com> libsysutils: Handle EINTR in SocketClient::sendData()

+ Improve allocation code in sendMsg(code,msg,addErrno)

Change-Id: Ib5fe84bec1a167c369e7ba759acea395e832f6b5
/system/core/libsysutils/src/SocketClient.cpp
16ae478af46100a435c2875afa020721a59a411a 02-Nov-2010 Brad Fitzpatrick <bradfitz@android.com> Permit 0 length writes.

Change-Id: I087d0074c8d9e13ce814187475966da94f693fc0
/system/core/libsysutils/src/SocketClient.cpp
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/libsysutils/src/SocketClient.cpp
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/libsysutils/src/SocketClient.cpp
7e8529a8b528fd30586aa037f15a31b29582c537 25-Mar-2010 San Mehat <san@google.com> system/core: Switch libsysutils & sched_policy LOG -> SLOG

Change-Id: Id74c6895a8012c5915f2e259339101844de7c085
Signed-off-by: San Mehat <san@google.com>
/system/core/libsysutils/src/SocketClient.cpp
c73a3a5771a2d29d1bae666bfde12f751d66fc96 15-Jun-2009 San Mehat <san@google.com> libsysutils: Move to a null terminated string protocol using space as a field separator.

Also removes some debugging

Signed-off-by: San Mehat <san@google.com>
/system/core/libsysutils/src/SocketClient.cpp
03f0d27f6c49530a91402ed42f8ca4b2fda04b9f 27-May-2009 San Mehat <san@google.com> libsysutils: Fix command argument passing bug + whitespace cleanup

Signed-off-by: San Mehat <san@google.com>
/system/core/libsysutils/src/SocketClient.cpp
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/libsysutils/src/SocketClient.cpp
df6c1b91e3813886070f35929583c30cfaead918 13-May-2009 San Mehat <san@google.com> libsysutils: General clean up + disable build in simulator builds

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

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