Merge "Fix KW P1 related issues"
This commit is contained in:
commit
7d9edb3c22
3 changed files with 14 additions and 9 deletions
|
@ -2000,8 +2000,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 ||
|
||||
|
@ -3023,8 +3025,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());
|
||||
|
@ -3119,8 +3121,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