Add a global return_success() method implementation
authorMartin Willi <martin@revosec.ch>
Tue, 29 Jan 2013 11:20:10 +0000 (12:20 +0100)
committerMartin Willi <martin@revosec.ch>
Thu, 14 Feb 2013 16:17:45 +0000 (17:17 +0100)
src/libcharon/sa/ikev2/tasks/ike_dpd.c
src/libstrongswan/utils/utils.c
src/libstrongswan/utils/utils.h

index 28ccc2e..7a33f79 100644 (file)
@@ -37,12 +37,6 @@ METHOD(task_t, return_need_more, status_t,
        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,
        private_ike_dpd_t *this)
 {
@@ -82,11 +76,11 @@ ike_dpd_t *ike_dpd_create(bool initiator)
        if (initiator)
        {
                this->public.task.build = _return_need_more;
-               this->public.task.process = _return_success;
+               this->public.task.process = (void*)return_success;
        }
        else
        {
-               this->public.task.build = _return_success;
+               this->public.task.build = (void*)return_success;
                this->public.task.process = _return_need_more;
        }
 
index fc2fe4a..0850df9 100644 (file)
@@ -387,6 +387,14 @@ status_t return_failed()
 }
 
 /**
+ * returns SUCCESS
+ */
+status_t return_success()
+{
+       return SUCCESS;
+}
+
+/**
  * nop operation
  */
 void nop()
index 7b1beb9..6c24a26 100644 (file)
@@ -496,6 +496,11 @@ bool return_false();
 status_t return_failed();
 
 /**
+ * returns SUCCESS
+ */
+status_t return_success();
+
+/**
  * Write a 16-bit host order value in network order to an unaligned address.
  *
  * @param host         host order 16-bit value