check if optional terminate() function exists
This commit is contained in:
@@ -25,7 +25,8 @@ METHOD(plugin_t, destroy, void,
|
||||
|
||||
while (charon->imcs->remove_last(charon->imcs, (void**)&imc) == SUCCESS)
|
||||
{
|
||||
if (imc->terminate(imc->get_id(imc)) != TNC_RESULT_SUCCESS)
|
||||
if (imc->terminate &&
|
||||
imc->terminate(imc->get_id(imc)) != TNC_RESULT_SUCCESS)
|
||||
{
|
||||
DBG1(DBG_TNC, "IMC '%s' not terminated successfully",
|
||||
imc->get_name(imc));
|
||||
|
||||
@@ -25,7 +25,8 @@ METHOD(plugin_t, destroy, void,
|
||||
|
||||
while (charon->imvs->remove_last(charon->imvs, (void**)&imv) == SUCCESS)
|
||||
{
|
||||
if (imv->terminate(imv->get_id(imv)) != TNC_RESULT_SUCCESS)
|
||||
if (imv->terminate &&
|
||||
imv->terminate(imv->get_id(imv)) != TNC_RESULT_SUCCESS)
|
||||
{
|
||||
DBG1(DBG_TNC, "IMV '%s' not terminated successfully",
|
||||
imv->get_name(imv));
|
||||
|
||||
Reference in New Issue
Block a user