AbstractController.cc (10837:ecbab2522757) | AbstractController.cc (10977:9b3b9be42dd9) |
---|---|
1/* 2 * Copyright (c) 2011-2014 Mark D. Hill and David A. Wood 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 140 unchanged lines hidden (view full) --- 149void 150AbstractController::wakeUpAllBuffers() 151{ 152 // 153 // Wake up all possible buffers that could be waiting on any message. 154 // 155 156 std::vector<MsgVecType*> wokeUpMsgVecs; | 1/* 2 * Copyright (c) 2011-2014 Mark D. Hill and David A. Wood 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 140 unchanged lines hidden (view full) --- 149void 150AbstractController::wakeUpAllBuffers() 151{ 152 // 153 // Wake up all possible buffers that could be waiting on any message. 154 // 155 156 std::vector<MsgVecType*> wokeUpMsgVecs; |
157 MsgBufType wokeUpMsgBufs; |
|
157 158 if(m_waiting_buffers.size() > 0) { 159 for (WaitingBufType::iterator buf_iter = m_waiting_buffers.begin(); 160 buf_iter != m_waiting_buffers.end(); 161 ++buf_iter) { 162 for (MsgVecType::iterator vec_iter = buf_iter->second->begin(); 163 vec_iter != buf_iter->second->end(); 164 ++vec_iter) { | 158 159 if(m_waiting_buffers.size() > 0) { 160 for (WaitingBufType::iterator buf_iter = m_waiting_buffers.begin(); 161 buf_iter != m_waiting_buffers.end(); 162 ++buf_iter) { 163 for (MsgVecType::iterator vec_iter = buf_iter->second->begin(); 164 vec_iter != buf_iter->second->end(); 165 ++vec_iter) { |
165 if (*vec_iter != NULL) { | 166 // 167 // Make sure the MessageBuffer has not already be reanalyzed 168 // 169 if (*vec_iter != NULL && 170 (wokeUpMsgBufs.count(*vec_iter) == 0)) { |
166 (*vec_iter)->reanalyzeAllMessages(); | 171 (*vec_iter)->reanalyzeAllMessages(); |
172 wokeUpMsgBufs.insert(*vec_iter); |
|
167 } 168 } 169 wokeUpMsgVecs.push_back(buf_iter->second); 170 } 171 172 for (std::vector<MsgVecType*>::iterator wb_iter = wokeUpMsgVecs.begin(); 173 wb_iter != wokeUpMsgVecs.end(); 174 ++wb_iter) { --- 175 unchanged lines hidden --- | 173 } 174 } 175 wokeUpMsgVecs.push_back(buf_iter->second); 176 } 177 178 for (std::vector<MsgVecType*>::iterator wb_iter = wokeUpMsgVecs.begin(); 179 wb_iter != wokeUpMsgVecs.end(); 180 ++wb_iter) { --- 175 unchanged lines hidden --- |