Fix KW P1 related issues
Change-Id: Ifc3cb9dcabf2e07439fd596b5ad33b46ea562b3d CRs-fixed: 2375836
This commit is contained in:
parent
3203504a28
commit
abfeea182d
3 changed files with 14 additions and 9 deletions
|
@ -1999,8 +1999,10 @@ GnssAdapter::restartSessions()
|
|||
}
|
||||
|
||||
// get the LocationOptions that has the smallest interval, which should be the active one
|
||||
TrackingOptions smallestIntervalOptions = {}; // size is zero until set for the first time
|
||||
TrackingOptions highestPowerTrackingOptions = {};
|
||||
TrackingOptions smallestIntervalOptions; // size is zero until set for the first time
|
||||
TrackingOptions highestPowerTrackingOptions;
|
||||
memset(&smallestIntervalOptions, 0, sizeof(smallestIntervalOptions));
|
||||
memset(&highestPowerTrackingOptions, 0, sizeof(highestPowerTrackingOptions));
|
||||
for (auto it = mTrackingSessions.begin(); it != mTrackingSessions.end(); ++it) {
|
||||
// size of zero means we havent set it yet
|
||||
if (0 == smallestIntervalOptions.size ||
|
||||
|
@ -3022,8 +3024,8 @@ GnssAdapter::reportPosition(const UlpLocation& ulpLocation,
|
|||
loc_nmea_generate_pos(ulpLocation, locationExtended, mLocSystemInfo,
|
||||
generate_nmea, nmeaArraystr);
|
||||
stringstream ss;
|
||||
for (auto sentence : nmeaArraystr) {
|
||||
ss << sentence;
|
||||
for (auto itor = nmeaArraystr.begin(); itor != nmeaArraystr.end(); ++itor) {
|
||||
ss << *itor;
|
||||
}
|
||||
string s = ss.str();
|
||||
reportNmea(s.c_str(), s.length());
|
||||
|
@ -3118,8 +3120,8 @@ GnssAdapter::reportSv(GnssSvNotification& svNotify)
|
|||
std::vector<std::string> nmeaArraystr;
|
||||
loc_nmea_generate_sv(svNotify, nmeaArraystr);
|
||||
stringstream ss;
|
||||
for (auto sentence : nmeaArraystr) {
|
||||
ss << sentence;
|
||||
for (auto itor = nmeaArraystr.begin(); itor != nmeaArraystr.end(); ++itor) {
|
||||
ss << *itor;
|
||||
}
|
||||
string s = ss.str();
|
||||
reportNmea(s.c_str(), s.length());
|
||||
|
|
|
@ -219,8 +219,11 @@ void XtraSystemStatusObserver::notify(const list<IDataItemCore*>& dlist)
|
|||
}
|
||||
|
||||
inline ~HandleOsObserverUpdateMsg() {
|
||||
for (auto each : mDataItemList) {
|
||||
delete each;
|
||||
for (auto itor = mDataItemList.begin(); itor != mDataItemList.end(); ++itor) {
|
||||
if (*itor != nullptr) {
|
||||
delete *itor;
|
||||
*itor = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ public:
|
|||
// This class hides generated fd and destination address object from user.
|
||||
inline LocIpcSender(const char* destSocket):
|
||||
LocIpcSender(std::make_shared<int>(::socket(AF_UNIX, SOCK_DGRAM, 0)), destSocket) {
|
||||
if (-1 == *mSocket) {
|
||||
if (mSocket != nullptr && -1 == *mSocket) {
|
||||
mSocket = nullptr;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue