Properly select IMC/IMV according to given primary ID in reserve_id()

This commit is contained in:
Tobias Brunner 2012-12-18 15:49:21 +01:00
parent 4185c64464
commit 6a8eeba540
2 changed files with 2 additions and 2 deletions

View File

@ -193,7 +193,7 @@ METHOD(imc_manager_t, reserve_id, bool,
enumerator = this->imcs->create_enumerator(this->imcs);
while (enumerator->enumerate(enumerator, &imc))
{
if (imc->get_id(imc))
if (id == imc->get_id(imc))
{
found = TRUE;
*new_id = this->next_imc_id++;

View File

@ -207,7 +207,7 @@ METHOD(imv_manager_t, reserve_id, bool,
enumerator = this->imvs->create_enumerator(this->imvs);
while (enumerator->enumerate(enumerator, &imv))
{
if (imv->get_id(imv))
if (id == imv->get_id(imv))
{
found = TRUE;
*new_id = this->next_imv_id++;