Hi Lennart,

  The reason I removed it in some cases is because the warning was removed 
simply by using "%u" instead of "%d". I thought it was better to have no call 
to LOG_WA, than to add one. If you think we should still have a warning 
printed, I can add it.


  I will add a reason for the logd crash in the commit.


Alex

________________________________
From: Lennart Lund <lennart.l...@ericsson.com>
Sent: Monday, January 21, 2019 9:20:12 AM
To: Jones, Alex; Hans Nordebäck; Anders Widell; Vu Minh Nguyen
Cc: opensaf-devel@lists.sourceforge.net
Subject: SV: [PATCH 5/5] logd: fix crash in logd [#2999]

________________________________
NOTICE: This email was received from an EXTERNAL sender
________________________________


Hi Alex,


Ack.


You have added a printout or log WA if data is truncated in many places but 
have removed that warning in some other. What is the logic for this. It is that 
in some cases there will be an error if the truncation is done e.g. if a 
command line command is created and in other cases it will just be a message 
that is truncated?


Thanks
Lennart

________________________________
Från: Jones, Alex <ajo...@rbbn.com>
Skickat: den 17 januari 2019 20:27
Till: Hans Nordebäck; Lennart Lund; Anders Widell; Vu Minh Nguyen
Kopia: opensaf-devel@lists.sourceforge.net; Jones, Alex
Ämne: [PATCH 5/5] logd: fix crash in logd [#2999]

---
src/log/logd/lgs_dest.cc | 2 +-
src/log/logd/lgs_unixsock_dest.cc | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/log/logd/lgs_dest.cc b/src/log/logd/lgs_dest.cc
index 0bd1fd3b0..0e70ddd12 100644
--- a/src/log/logd/lgs_dest.cc
+++ b/src/log/logd/lgs_dest.cc
@@ -114,7 +114,7 @@ void DestinationHandler::UpdateDestTypeDb(

case MsgType::kNoDest: {
TRACE("%s kNoDest", __func__);
- for (auto& it : nametype_map_) nametype_map_.erase(it.first);
+ nametype_map_.clear();
break;
}

diff --git a/src/log/logd/lgs_unixsock_dest.cc 
b/src/log/logd/lgs_unixsock_dest.cc
index 35ef43175..a48250063 100644
--- a/src/log/logd/lgs_unixsock_dest.cc
+++ b/src/log/logd/lgs_unixsock_dest.cc
@@ -329,10 +329,9 @@ ErrCode UnixSocketType::ProcessMsg(const 
DestinationHandler::HandleMsg& msg) {
return ErrCode::kDrop;
}

- for (auto& it : name_sockethdlr_map_) {
+ for (auto& it : name_sockethdlr_map_)
if (it.second != nullptr) delete it.second;
- name_sockethdlr_map_.erase(it.first);
- }
+ name_sockethdlr_map_.clear();
cfgsent = false;
break;
}
--
2.17.2


________________________________
Notice: This e-mail together with any attachments may contain information of 
Ribbon Communications Inc. that is confidential and/or proprietary for the sole 
use of the intended recipient. Any review, disclosure, reliance or distribution 
by others or forwarding without express permission is strictly prohibited. If 
you are not the intended recipient, please notify the sender immediately and 
then delete all copies, including any attachments.
________________________________

_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to