aboutsummaryrefslogtreecommitdiffstats
path: root/src/assuan-handler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/assuan-handler.c')
-rw-r--r--src/assuan-handler.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/assuan-handler.c b/src/assuan-handler.c
index 19dab71..fd3a52b 100644
--- a/src/assuan-handler.c
+++ b/src/assuan-handler.c
@@ -292,6 +292,16 @@ assuan_register_command (assuan_context_t ctx,
}
int
+assuan_register_post_cmd_notify (assuan_context_t ctx,
+ void (*fnc)(assuan_context_t, int))
+{
+ if (!ctx)
+ return _assuan_error (ASSUAN_Invalid_Value);
+ ctx->post_cmd_notify_fnc = fnc;
+ return 0;
+}
+
+int
assuan_register_bye_notify (assuan_context_t ctx,
void (*fnc)(assuan_context_t))
{
@@ -543,6 +553,9 @@ process_request (assuan_context_t ctx)
rc = assuan_write_line (ctx, errline);
}
+ if (ctx->post_cmd_notify_fnc)
+ ctx->post_cmd_notify_fnc (ctx, rc);
+
ctx->confidential = 0;
if (ctx->okay_line)
{