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.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/assuan-handler.c b/src/assuan-handler.c
index e9d7b07..7be48e6 100644
--- a/src/assuan-handler.c
+++ b/src/assuan-handler.c
@@ -684,15 +684,16 @@ assuan_set_okay_line (ASSUAN_CONTEXT ctx, const char *line)
-void
+assuan_error_t
assuan_write_status (ASSUAN_CONTEXT ctx, const char *keyword, const char *text)
{
char buffer[256];
char *helpbuf;
size_t n;
+ assuan_error_t ae;
if ( !ctx || !keyword)
- return;
+ return ASSUAN_Invalid_Value;
if (!text)
text = "";
@@ -706,7 +707,7 @@ assuan_write_status (ASSUAN_CONTEXT ctx, const char *keyword, const char *text)
strcat (buffer, " ");
strcat (buffer, text);
}
- assuan_write_line (ctx, buffer);
+ ae = assuan_write_line (ctx, buffer);
}
else if ( (helpbuf = xtrymalloc (n)) )
{
@@ -717,7 +718,10 @@ assuan_write_status (ASSUAN_CONTEXT ctx, const char *keyword, const char *text)
strcat (helpbuf, " ");
strcat (helpbuf, text);
}
- assuan_write_line (ctx, helpbuf);
+ ae = assuan_write_line (ctx, helpbuf);
xfree (helpbuf);
}
+ else
+ ae = 0;
+ return ae;
}