unit-tests: Return status from process_message()
This commit is contained in:
parent
7c6e0c2979
commit
b76c1decd4
|
@ -179,17 +179,20 @@ METHOD(backend_t, create_peer_cfg_enumerator, enumerator_t*,
|
|||
return enumerator_create_single(this->peer_cfg, NULL);
|
||||
}
|
||||
|
||||
METHOD(exchange_test_helper_t, process_message, void,
|
||||
METHOD(exchange_test_helper_t, process_message, status_t,
|
||||
private_exchange_test_helper_t *this, ike_sa_t *ike_sa, message_t *message)
|
||||
{
|
||||
status_t status;
|
||||
|
||||
if (!message)
|
||||
{
|
||||
message = this->public.sender->dequeue(this->public.sender);
|
||||
}
|
||||
charon->bus->set_sa(charon->bus, ike_sa);
|
||||
ike_sa->process_message(ike_sa, message);
|
||||
status = ike_sa->process_message(ike_sa, message);
|
||||
charon->bus->set_sa(charon->bus, NULL);
|
||||
message->destroy(message);
|
||||
return status;
|
||||
}
|
||||
|
||||
METHOD(exchange_test_helper_t, establish_sa, void,
|
||||
|
|
|
@ -64,9 +64,10 @@ struct exchange_test_helper_t {
|
|||
* @param ike_sa the IKE_SA receiving the message
|
||||
* @param message the message, or NULL to pass the next message in the
|
||||
* send queue (adopted)
|
||||
* @return return value from ike_sa_t::process_message()
|
||||
*/
|
||||
void (*process_message)(exchange_test_helper_t *this, ike_sa_t *sa,
|
||||
message_t *message);
|
||||
status_t (*process_message)(exchange_test_helper_t *this, ike_sa_t *sa,
|
||||
message_t *message);
|
||||
|
||||
/**
|
||||
* Register a listener with the bus.
|
||||
|
|
Loading…
Reference in New Issue