Commit graph

11 commits

Author SHA1 Message Date
Kevin Tang
0677be4e46 Removing LocIpc::createLocIpcQsock* APIs
Qrtr and Qsock bot have createLocIpc*Sender and Recver
APIs in LocIpc. But Qrtr is really next gen of Qsock.
The two will not co-exist. Their existence depends on
kernel versions, i.e. 4.9 and earlier is Qsock; while
4.14 and later is Qrtr. Having 2 sets of APIs doesn't
make sense, as client would have to know what are the
right ones to use, which there is really only one set
of backing implementations.

Change-Id: Ia473f282bb271ae213d7dc5020b0b8c7b0a8cb8f
CRs-Fixed: 2466857
2019-06-06 16:21:18 -07:00
Nilesh Gharde
210d3ca227 Addressing format related to formating
Added formating related issue as
genuine errors fixes

Change-Id: Ie01e9ce3bf838a37871a4779ae1403b4dca3d87c
CRs-Fixed: 2447200
2019-05-18 09:12:29 -07:00
Bhavna Sharma
2ba3f04c57 LocIpc redesign
LocIpc now doesn't have any impelementation of sockets,
but a framework that provides threading for any sockets
that can be wrapped into LocIpcSender and LocIpcRever
APIs.

Also updated XtraSystemStatusObserver to using the new
LocIpc and LocIpcLocalSender and LocIpcLocalRecver.

Change-Id: I506c77198f9ce1e7d4dfd5e596dc0ac21d928e34
CRs-Fixed: 2443124
2019-05-09 07:34:22 -07:00
Kevin Tang
07db01d9af LocIpc derefs nullptr if stopping blocking listener
LocIpcRunnable is created only for nonBlocking listeners.
But stopListening would use LocIpcRunnable not knowing if
this is a blocking or nonblocking listener. LocIpcRunnable
is no longer a shared resource between the two threads. We
use a copy of string to keep the needed socket name.

Change-Id: Ib5c57a89f630807d6d03f3fbc698a56b9ffddf4d
CRs-Fixed: 2431397
2019-04-08 13:36:36 -07:00
Kevin Tang
99e5e01b13 LocIpc could be using data member from a deleted obj
startListeningBlocking is meant to be called under a reader
thread, which is the case if startListeningNonBlocking calls
it. A LocIpc client may delete the LocIpc obj, which would
trigger sending an ABORT msg to the reader thread before it
is subsequently deleted, in which case, it is possible that
when the reader thread comes around to process the ABORT msg,
referencing the data members of the possibly stale obj would
cause unpredictable behaviors.

Change-Id: I441af85c04d92b6fff695c020e3e0b4bd5e90409
CRs-Fixed: 2380093
2019-01-17 14:08:01 -08:00
Katz Yamada
f3b1394b15 Add socket name in error log message
Change-Id: I229ce4c5bfa54df26ff00d68377dfc91cf11f5f0
CRs-Fixed: 2338533
2018-10-26 15:01:44 -07:00
Katz Yamada
8bda43ca51 fix: LocIpc client app unable to exit
LocIpc client apps such as garden app is unable
to delete LocIpc object since its socket listening
thread cannot be closed while it is waiting for
data and cannot be closed. Fixed to close it by
sending an abort message.

CRs-Fixed: 2213212
Change-Id: I95f26862e9faf7bd75a2f447421ba4ab7220576e
2018-05-15 09:48:34 -07:00
Kevin Tang
61de97e130 LE clean up
separated utils, core, ds and loc-api-v02 from loc-hal into their
own independent packages; simplified loc-pla; moved pla to the
root of project; removed loc-stub.

Change-Id: I373f02f9306646addf55ae90d71c4ba8e3741d09
CRs-Fixed: 2172544
2018-01-16 13:35:38 -08:00
Kevin Tang
4cac1baf97 LocIpc: enhance startListeningNoBlocking with ready callback
For startListeningNoBlocking, for callers that need to know
when the socket is actually being created and ready to receive
message, this change allows callback to be invoked when socket
is ready.

Change-Id: Ie7c6eb1a3966371d84fc98109f07805ac7d4e3a1
CRs-fixed: 2169568
2018-01-15 10:18:49 -08:00
Katz Yamada
99e0f11428 Location Utils - LocIpc class enhancement
Add LocIpcSender class and add an overloaded
send method in LocIpc class that takes binary
data block.

Change-Id: I102f23fe8bf378c3bed5cac0086aa9773c62727b
CRs-Fixed: 2144883
2017-12-18 11:37:24 -08:00
Ruifeng Xu
b0982b4476 add HAL socket
this patch contains the following changes:
1. added header and implemenation files of socket util apis
in libgps.utils; 2. updated XtraSystemStatusObserver to use
the new apis; 3. added HAL socket and new thread to listen to it.

Change-Id: If1f6b4b4d6ea2d03640f68e96f0286300404f42b
CRs-fixed: 2108635
2017-10-05 11:33:37 -07:00