aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmdsclient/inbound.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-09-04 13:46:57 +0200
committerMattias Andrée <maandree@operamail.com>2015-09-04 13:46:57 +0200
commiteb716697c6e34f0dc75437f48ec0da8658be9503 (patch)
tree6efc0340d96bafd8f685d00ca6f58f530b78dc2e /src/libmdsclient/inbound.c
parentadd libmds_message (diff)
downloadmds-eb716697c6e34f0dc75437f48ec0da8658be9503.tar.gz
mds-eb716697c6e34f0dc75437f48ec0da8658be9503.tar.bz2
mds-eb716697c6e34f0dc75437f48ec0da8658be9503.tar.xz
m doc
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/libmdsclient/inbound.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/libmdsclient/inbound.c b/src/libmdsclient/inbound.c
index 35e7ca5..d56cf56 100644
--- a/src/libmdsclient/inbound.c
+++ b/src/libmdsclient/inbound.c
@@ -35,6 +35,9 @@
* @param this Memory slot in which to store the new message
* @return Non-zero on error, `errno` will be set accordingly.
* Destroy the message on error.
+ *
+ * @throws ENOMEM Out of memory. Possibly, the process hit the RLIMIT_AS or
+ * RLIMIT_DATA limit described in getrlimit(2).
*/
int libmds_message_initialise(libmds_message_t* restrict this)
{
@@ -154,6 +157,9 @@ static int verify_utf8(const char* string, int allow_modified_nul) /* Cannibalis
* @param this The message
* @param extent The number of additional entries
* @return Zero on success, -1 on error
+ *
+ * @throws ENOMEM Out of memory. Possibly, the process hit the RLIMIT_AS or
+ * RLIMIT_DATA limit described in getrlimit(2).
*/
__attribute__((nonnull))
static int extend_headers(libmds_message_t* restrict this, size_t extent)
@@ -171,6 +177,9 @@ static int extend_headers(libmds_message_t* restrict this, size_t extent)
*
* @param this The message
* @return Zero on success, -1 on error
+ *
+ * @throws ENOMEM Out of memory. Possibly, the process hit the RLIMIT_AS or
+ * RLIMIT_DATA limit described in getrlimit(2).
*/
__attribute__((nonnull))
static int extend_buffer(libmds_message_t* restrict this)
@@ -287,6 +296,9 @@ static void unbuffer_beginning(libmds_message_t* restrict this, size_t length, i
*
* @param this The message
* @return The return value follows the rules of `mds_message_read`
+ *
+ * @throws ENOMEM Out of memory. Possibly, the process hit the RLIMIT_AS or
+ * RLIMIT_DATA limit described in getrlimit(2).
*/
__attribute__((nonnull))
static int initialise_payload(libmds_message_t* restrict this)
@@ -313,6 +325,9 @@ static int initialise_payload(libmds_message_t* restrict this)
* @param this The message
* @param length The length of the header, including LF-termination
* @return The return value follows the rules of `mds_message_read`
+ *
+ * @throws ENOMEM Out of memory. Possibly, the process hit the RLIMIT_AS or
+ * RLIMIT_DATA limit described in getrlimit(2).
*/
__attribute__((nonnull))
static int store_header(libmds_message_t* restrict this, size_t length)
@@ -352,6 +367,10 @@ static int store_header(libmds_message_t* restrict this, size_t length)
* @param this The message
* @param fd The file descriptor of the socket
* @return The return value follows the rules of `mds_message_read`
+ *
+ * @throws ENOMEM Out of memory. Possibly, the process hit the RLIMIT_AS or
+ * RLIMIT_DATA limit described in getrlimit(2).
+ * @throws Any error specified for recv(3)
*/
__attribute__((nonnull))
static int continue_read(libmds_message_t* restrict this, int fd)
@@ -398,6 +417,10 @@ static int continue_read(libmds_message_t* restrict this, int fd)
* If -2 is returned `errno` will not have been set,
* -2 indicates that the message is malformated,
* which is a state that cannot be recovered from.
+ *
+ * @throws ENOMEM Out of memory. Possibly, the process hit the RLIMIT_AS or
+ * RLIMIT_DATA limit described in getrlimit(2).
+ * @throws Any error specified for recv(3)
*/
int libmds_message_read(libmds_message_t* restrict this, int fd)
{