Ejemplo n.º 1
0
void 	Drop(int argc, char *argv[], BBWinNet & bbobj)
{
	bbobj.SetHostName(argv[3]);
	cout << "hostname defined to: " << argv[3] << "\n";
	cout << "Sending drop ...\n";
	try {
		if (argc > 4)
			bbobj.Drop(argv[4]);
		else
			bbobj.Drop();
	} catch (BBWinNetException ex) {
		cout << "Error : " << ex.getMessage() << "\n";
	}
}
Ejemplo n.º 2
0
void		BBWinAgentManager::Drop()  {
	bbdisplay_t::iterator			itr;
	BBWinNet						hobNet;
		
	PrepareBBWinNetObj(hobNet);
	for ( itr = m_bbdisplay.begin(); itr != m_bbdisplay.end(); ++itr) {
		hobNet.SetBBDisplay((*itr));
		try {
			hobNet.Drop();
		} catch (BBWinNetException ex) {
			if (m_logReportFailure) {
				string mes;
			
				mes = "Sending 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 ; 
		}
	}
}