/*** On commit, perform frees, clear lists, exit epoch */ void onTxCommit() { AddressList::iterator i, e; for (i = frees.begin(), e = frees.end(); i != e; ++i) { schedForReclaim(*i); } frees.reset(); allocs.reset(); *my_ts = 1+*my_ts; }
/*** On abort, unroll allocs, clear lists, exit epoch */ void onTxAbort() { AddressList::iterator i, e; for (i = allocs.begin(), e = allocs.end(); i != e; ++i) { free(*i); } frees.reset(); allocs.reset(); *my_ts = 1+*my_ts; }
AddrSpecList VacationDialog::mailAliases() const { QCString text = mMailAliasesEdit->text().latin1(); // ### IMAA: !ok AddressList al; const char * s = text.begin(); parseAddressList( s, text.end(), al ); AddrSpecList asl; for ( AddressList::const_iterator it = al.begin() ; it != al.end() ; ++it ) { const MailboxList & mbl = (*it).mailboxList; for ( MailboxList::const_iterator jt = mbl.begin() ; jt != mbl.end() ; ++jt ) asl.push_back( (*jt).addrSpec ); } return asl; }
int VBoxNetDhcp::fetchAndUpdateDnsInfo() { ComHostPtr host; if (SUCCEEDED(virtualbox->COMGETTER(Host)(host.asOutParam()))) { AddressToOffsetMapping mapIp4Addr2Off; int rc = localMappings(m_NATNetwork, mapIp4Addr2Off); /* XXX: here could be several cases: 1. COM error, 2. not found (empty) 3. ? */ AssertMsgRCReturn(rc, ("Can't fetch local mappings"), rc); RTNETADDRIPV4 address = getIpv4Address(); RTNETADDRIPV4 netmask = getIpv4Netmask(); AddressList nameservers; rc = hostDnsServers(host, networkid(address, netmask), mapIp4Addr2Off, nameservers); AssertMsgRCReturn(rc, ("Debug me!!!"), rc); /* XXX: Search strings */ std::string domain; rc = hostDnsDomain(host, domain); AssertMsgRCReturn(rc, ("Debug me!!"), rc); { VBoxNetALock(this); ConfigurationManager *confManager = ConfigurationManager::getConfigurationManager(); confManager->flushAddressList(RTNET_DHCP_OPT_DNS); for (AddressList::iterator it = nameservers.begin(); it != nameservers.end(); ++it) confManager->addToAddressList(RTNET_DHCP_OPT_DNS, *it); confManager->setString(RTNET_DHCP_OPT_DOMAIN_NAME, domain); } } return VINF_SUCCESS; }
void connect(::zmq::socket_t& socket, const AddressList& address_list) { typedef typename AddressList::const_iterator iter_t; for (iter_t it = address_list.begin(); it != address_list.end(); ++it) socket.connect(it->c_str()); }