From: Andreas Steffen Date: Mon, 8 Jul 2013 15:52:30 +0000 (+0200) Subject: Scanner IMV without workitems provides immediate recommendation, too X-Git-Tag: 5.1.0dr2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=34f894b6ccc0e5894088ffe18b48fe705e4dff50;p=thirdparty%2Fstrongswan.git Scanner IMV without workitems provides immediate recommendation, too --- diff --git a/src/libimcv/plugins/imv_scanner/imv_scanner_agent.c b/src/libimcv/plugins/imv_scanner/imv_scanner_agent.c index a8a12bccb1..7c1e76dbe6 100644 --- a/src/libimcv/plugins/imv_scanner/imv_scanner_agent.c +++ b/src/libimcv/plugins/imv_scanner/imv_scanner_agent.c @@ -442,20 +442,21 @@ METHOD(imv_agent_if_t, batch_ending, TNC_Result, workitem->destroy(workitem); } enumerator->destroy(enumerator); + } + + /* finalized all workitems ? */ + if (handshake_state == IMV_SCANNER_STATE_WORKITEMS && + session->get_workitem_count(session, imv_id) == 0) + { + result = out_msg->send_assessment(out_msg); + out_msg->destroy(out_msg); + scanner_state->set_handshake_state(scanner_state, IMV_SCANNER_STATE_END); - /* finalized all workitems ? */ - if (session->get_workitem_count(session, imv_id) == 0) + if (result != TNC_RESULT_SUCCESS) { - scanner_state->set_handshake_state(scanner_state, - IMV_SCANNER_STATE_END); - result = out_msg->send_assessment(out_msg); - out_msg->destroy(out_msg); - if (result != TNC_RESULT_SUCCESS) - { - return result; - } - return this->agent->provide_recommendation(this->agent, state); + return result; } + return this->agent->provide_recommendation(this->agent, state); } /* send non-empty PA-TNC message with excl flag not set */