void BBWinAgentManager::Pager(LPCTSTR testName, LPCTSTR color, LPCTSTR text, LPCTSTR lifeTime) { bbpager_t::iterator itr; BBWinNet hobNet; assert(testName != NULL); assert(color != NULL); assert(text != NULL); assert(lifeTime != NULL); if (m_usepager == true && m_setting["pagerlevels"].length() > 0 && m_bbpager.size() > 0) { istringstream iss(m_setting["pagerlevels"]); bool matchColor = false; string word; while ( std::getline(iss, word, ' ') ) { if (word == color) { matchColor = true; } } if (matchColor) { PrepareBBWinNetObj(hobNet); for ( itr = m_bbpager.begin(); itr != m_bbpager.end(); ++itr) { hobNet.SetBBPager((*itr)); try { hobNet.Pager(testName, color, text, lifeTime); } catch (BBWinNetException ex) { if (m_logReportFailure) { string mes; mes = "Sending pager report to " + (*itr) + " failed."; LPCTSTR arg[] = {m_agentName.c_str(), mes.c_str(), NULL}; m_log->reportWarnEvent(BBWIN_AGENT, EVENT_MESSAGE_AGENT, 2, arg); } continue ; } } } } }