Add a global return_success() method implementation

This commit is contained in:
Martin Willi
2013-02-14 17:17:45 +01:00
parent de32b8aed6
commit 4755ab505d
3 changed files with 15 additions and 8 deletions
+2 -8
View File
@@ -37,12 +37,6 @@ METHOD(task_t, return_need_more, status_t,
return NEED_MORE; return NEED_MORE;
} }
METHOD(task_t, return_success, status_t,
private_ike_dpd_t *this, message_t *message)
{
return SUCCESS;
}
METHOD(task_t, get_type, task_type_t, METHOD(task_t, get_type, task_type_t,
private_ike_dpd_t *this) private_ike_dpd_t *this)
{ {
@@ -82,11 +76,11 @@ ike_dpd_t *ike_dpd_create(bool initiator)
if (initiator) if (initiator)
{ {
this->public.task.build = _return_need_more; this->public.task.build = _return_need_more;
this->public.task.process = _return_success; this->public.task.process = (void*)return_success;
} }
else else
{ {
this->public.task.build = _return_success; this->public.task.build = (void*)return_success;
this->public.task.process = _return_need_more; this->public.task.process = _return_need_more;
} }
+8
View File
@@ -386,6 +386,14 @@ status_t return_failed()
return FAILED; return FAILED;
} }
/**
* returns SUCCESS
*/
status_t return_success()
{
return SUCCESS;
}
/** /**
* nop operation * nop operation
*/ */
+5
View File
@@ -495,6 +495,11 @@ bool return_false();
*/ */
status_t return_failed(); status_t return_failed();
/**
* returns SUCCESS
*/
status_t return_success();
/** /**
* Write a 16-bit host order value in network order to an unaligned address. * Write a 16-bit host order value in network order to an unaligned address.
* *