]> 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>
Tue, 14 May 2019 08:44:18 +0000 (10:44 +0200)
src/libcharon/sa/ikev2/tasks/ike_dpd.c
src/libstrongswan/utils/utils/status.c
src/libstrongswan/utils/utils/status.h

index d025a046d178390a995fcac62fffd2345627d127..d579dd68cd3055fdf9635516c5451e25917b8a59 100644 (file)
@@ -31,12 +31,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)
 {
@@ -47,7 +41,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,
@@ -75,13 +68,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 21f38a6de196582125b5ad48876199008be0f135..7b0faece76c012fc0d194158e8985df082a59c54 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2014 Tobias Brunner
+ * Copyright (C) 2008-2018 Tobias Brunner
  * Copyright (C) 2005-2008 Martin Willi
  * HSR Hochschule fuer Technik Rapperswil
  *
@@ -31,18 +31,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 8d96c2bfcf0ee61adbee92f3b89b2cb6110264d7..1778b78fecda8a95467eac4e210c4b43ea54ce97 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2014 Tobias Brunner
+ * Copyright (C) 2008-2018 Tobias Brunner
  * Copyright (C) 2008 Martin Willi
  * HSR Hochschule fuer Technik Rapperswil
  *
@@ -69,4 +69,9 @@ status_t return_failed();
  */
 status_t return_success();
 
+/**
+ * returns NEED_MORE
+ */
+status_t return_need_more();
+
 #endif /** STATUS_H_ @} */