readdition of map entry cycling

This commit is contained in:
vivek-shankar 2017-01-27 23:36:53 -05:00
parent c06ae0379d
commit 122c2888eb
1 changed files with 5 additions and 5 deletions

View File

@ -400,11 +400,11 @@ inline void CommunicationManager::Check_In_Messages_and_Transfer_To_Topics()
}
else if (header[1]==cur_checksum) {
std::map< std::size_t, std::shared_ptr<std::string> >::iterator it = multi_msgs.find(header[2]);
//if(it!=multi_msgs.end()){
//multi_msgs.erase(it);
//multi_msgs.insert(make_pair(header[2], in_message));
//}
if(it==multi_msgs.end()){
if(it!=multi_msgs.end()){
multi_msgs.erase(it);
multi_msgs.insert(make_pair(header[2], in_message));
}
else{
multi_msgs.insert(make_pair(header[2], in_message));
counter++;
}