aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcus Brinkmann <[email protected]>2010-01-05 04:07:48 +0000
committerMarcus Brinkmann <[email protected]>2010-01-05 04:07:48 +0000
commit9fb2db180d67d69dde8ab423489f3be17b8c9bc1 (patch)
tree0e24076df6d4eb32910c27ee011ddfe3f69beca9
parent2009-12-22 Marcus Brinkmann <[email protected]> (diff)
downloadlibassuan-9fb2db180d67d69dde8ab423489f3be17b8c9bc1.tar.gz
libassuan-9fb2db180d67d69dde8ab423489f3be17b8c9bc1.zip
Add comments.
-rw-r--r--src/assuan-buffer.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/assuan-buffer.c b/src/assuan-buffer.c
index 8dac4fb..1fd394b 100644
--- a/src/assuan-buffer.c
+++ b/src/assuan-buffer.c
@@ -31,7 +31,11 @@
/* Extended version of write(2) to guarantee that all bytes are
- written. Returns 0 on success or -1 and ERRNO on failure. */
+ written. Returns 0 on success or -1 and ERRNO on failure. NOTE:
+ This function does not return the number of bytes written, so any
+ error must be treated as fatal for this connection as the state of
+ the receiver is unknown. This works best if blocking is allowed
+ (so EAGAIN cannot occur). */
static int
writen (assuan_context_t ctx, const char *buffer, size_t length)
{
@@ -93,7 +97,8 @@ readline (assuan_context_t ctx, char *buf, size_t buflen,
}
-/* Function returns an Assuan error. */
+/* Read a line with buffering of partial lines. Function returns an
+ Assuan error. */
gpg_error_t
_assuan_read_line (assuan_context_t ctx)
{