From: Tobias Brunner Date: Thu, 22 Aug 2019 12:22:48 +0000 (+0200) Subject: task: Add optional post_process() method X-Git-Tag: 5.9.7dr2~1^2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=210e2177aa103ee212f8f42f9ba00bf427883a38;p=thirdparty%2Fstrongswan.git task: Add optional post_process() method This will allows tasks to do some work after a message has been processed. --- diff --git a/src/libcharon/sa/task.h b/src/libcharon/sa/task.h index b356ec0671..cc53e44254 100644 --- a/src/libcharon/sa/task.h +++ b/src/libcharon/sa/task.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007-2018 Tobias Brunner + * Copyright (C) 2007-2019 Tobias Brunner * Copyright (C) 2006 Martin Willi * * Copyright (C) secunet Security Networks AG @@ -184,6 +184,18 @@ struct task_t { */ status_t (*pre_process) (task_t *this, message_t *message); + /** + * Called after a message has been processed (optional to implement). + * + * @param message processed message + * @return + * - SUCCESS if task completed + * - NEED_MORE if another call to build/process needed + * - Anything else will result in the destruction of + * the IKE_SA + */ + status_t (*post_process) (task_t *this, message_t *message); + /** * Get the type of the task implementation. */