Пример #1
0
// call with list_cs locked
void write_ping_addresses() {
	int index = 0;
	for(PINGLIST::iterator i = list_items.begin(); i != list_items.end(); i++, index++) {
		i->index = index;
		write_ping_address(&(*i));
	}
}
Пример #2
0
// call with list_cs locked
void write_ping_addresses()
{
	int index = 0;
	for (pinglist_it i = list_items.begin(); i != list_items.end(); ++i, index++)
	{
		i->index = index;
		write_ping_address(*i);
	}

	// mark further destinations in the DB as invalid
	char buff[16];
	bool found;

	do {
		found = false;
		mir_snprintf(buff, "PING_DEST_%d", index++);
		if (db_get_dw(0, buff, "Id", 0) != 0) {
			found = true;
			db_set_dw(0, buff, "Id", 0);
		}
	} while (found);
}