---
 src/amf/amfnd/di.cc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/amf/amfnd/di.cc b/src/amf/amfnd/di.cc
index 7aac34260..6e5aaf54b 100644
--- a/src/amf/amfnd/di.cc
+++ b/src/amf/amfnd/di.cc
@@ -1293,7 +1293,9 @@ uint32_t avnd_di_node_down_msg_send(AVND_CB *cb)
 void avnd_di_msg_ack_process(AVND_CB *cb, uint32_t mid) {
   TRACE_ENTER2("%u", mid);
 
-  for (auto iter =  cb->dnd_list.begin(); iter != cb->dnd_list.end(); ++iter) {
+  std::vector<AVND_DND_MSG_LIST*> tmp = cb->dnd_list;
+
+  for (auto iter =  tmp.begin(); iter != tmp.end(); ++iter) {
     auto rec = *iter;
     osafassert(rec->msg.type == AVND_MSG_AVD);
     const uint32_t msg_id = 
*(reinterpret_cast<uint32_t*>(&(rec->msg.info.avd->msg_info)));
@@ -1306,12 +1308,13 @@ void avnd_di_msg_ack_process(AVND_CB *cb, uint32_t mid) 
{
         avnd_stop_tmr(cb, &rec->resp_tmr);
         avnd_last_step_clean(cb);
       }
-      cb->dnd_list.erase(iter);
+      tmp.erase(iter);
       TRACE("remove msg %u from queue", msg_id);
       avnd_diq_rec_del(cb, rec);
       break;
     }
   }
+  cb->dnd_list = tmp;
 
   TRACE_LEAVE2();
   return;
-- 
2.14.2


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to