From 4fa0a14fa2210efbe68c7a9fdb92b372858c75f1 Mon Sep 17 00:00:00 2001 From: Adi Bier / DL1HRC Date: Thu, 31 Mar 2022 15:57:27 +0200 Subject: [PATCH] Bugfix: use of empty iterator in TetraLogic::handleSdsMsg --- src/svxlink/svxlink/TetraLogic.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/svxlink/svxlink/TetraLogic.cpp b/src/svxlink/svxlink/TetraLogic.cpp index e287b206..4d9e52cd 100644 --- a/src/svxlink/svxlink/TetraLogic.cpp +++ b/src/svxlink/svxlink/TetraLogic.cpp @@ -1228,7 +1228,6 @@ void TetraLogic::firstContact(Sds tsds) */ void TetraLogic::handleSdsMsg(std::string sds) { - Sds t_sds; stringstream ss, sstcl; std::string sds_txt; @@ -1246,6 +1245,7 @@ void TetraLogic::handleSdsMsg(std::string sds) if (iu == userdata.end()) { firstContact(t_sds); + return; } // update last activity of sender @@ -1282,7 +1282,6 @@ void TetraLogic::handleSdsMsg(std::string sds) << " " << calcBearing(own_lat, own_lon, lipinfo.latitude, lipinfo.longitude); processEvent(sstcl.str()); - sdsinfo["lat"] = lipinfo.latitude; sdsinfo["lon"] = lipinfo.longitude; sdsinfo["reasonforsending"] = lipinfo.reasonforsending; @@ -2136,7 +2135,7 @@ bool TetraLogic::checkSds(void) // if message is sent -> get next available sds message if (pending_sds.tod != 0 || (pending_sds.tod == 0 && pending_sds.tos == 0)) { - // find the next SDS thatwas still not send + // find the next SDS that was still not send for (it=sdsQueue.begin(); it!=sdsQueue.end(); it++) { if (it->second.tos == 0 && it->second.direction == OUTGOING