]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
status: Add return_need_more() utility function
authorTobias Brunner <tobias@strongswan.org>
Fri, 13 Jul 2018 12:52:05 +0000 (14:52 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 29 Jun 2022 08:28:50 +0000 (10:28 +0200)
src/libcharon/sa/ikev2/tasks/ike_dpd.c
src/libstrongswan/utils/utils/status.c
src/libstrongswan/utils/utils/status.h

index 7a446c96299d2d4b0eb8f6fc6a175756733b48f8..724670cc898abbf51a83458892e1c94872d81928 100644 (file)
@@ -32,12 +32,6 @@ struct private_ike_dpd_t {
        ike_dpd_t public;
 };
 
-METHOD(task_t, return_need_more, status_t,
-       private_ike_dpd_t *this, message_t *message)
-{
-       return NEED_MORE;
-}
-
 METHOD(task_t, get_type, task_type_t,
        private_ike_dpd_t *this)
 {
@@ -48,7 +42,6 @@ METHOD(task_t, get_type, task_type_t,
 METHOD(task_t, migrate, void,
        private_ike_dpd_t *this, ike_sa_t *ike_sa)
 {
-
 }
 
 METHOD(task_t, destroy, void,
@@ -76,13 +69,13 @@ ike_dpd_t *ike_dpd_create(bool initiator)
 
        if (initiator)
        {
-               this->public.task.build = _return_need_more;
+               this->public.task.build = (void*)return_need_more;
                this->public.task.process = (void*)return_success;
        }
        else
        {
                this->public.task.build = (void*)return_success;
-               this->public.task.process = _return_need_more;
+               this->public.task.process = (void*)return_need_more;
        }
 
        return &this->public;
index dd07781795c200f79a76570dc5f71e051adf507d..2aced5e41d3669bb141ce7ca8348983133f458e5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2014 Tobias Brunner
+ * Copyright (C) 2008-2018 Tobias Brunner
  * Copyright (C) 2005-2008 Martin Willi
  *
  * Copyright (C) secunet Security Networks AG
@@ -32,18 +32,26 @@ ENUM(status_names, SUCCESS, NEED_MORE,
        "NEED_MORE",
 );
 
-/**
- * returns FAILED
+/*
+ * Described in header
  */
 status_t return_failed()
 {
        return FAILED;
 }
 
-/**
- * returns SUCCESS
+/*
+ * Described in header
  */
 status_t return_success()
 {
        return SUCCESS;
 }
+
+/*
+ * Described in header
+ */
+status_t return_need_more()
+{
+       return NEED_MORE;
+}
index 5f47e1f66d36ebd82c2cac81ac4c38278aaa7aae..954b1043ac39ddc982cf8df9dfd7995d8303dc0d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2014 Tobias Brunner
+ * Copyright (C) 2008-2018 Tobias Brunner
  * Copyright (C) 2008 Martin Willi
  *
  * Copyright (C) secunet Security Networks AG
@@ -70,4 +70,9 @@ status_t return_failed();
  */
 status_t return_success();
 
+/**
+ * returns NEED_MORE
+ */
+status_t return_need_more();
+
 #endif /** STATUS_H_ @} */