aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmdsserver/mds-message.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/libmdsserver/mds-message.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/libmdsserver/mds-message.c b/src/libmdsserver/mds-message.c
index bc71ca6..5051cb1 100644
--- a/src/libmdsserver/mds-message.c
+++ b/src/libmdsserver/mds-message.c
@@ -51,6 +51,25 @@ int mds_message_initialise(mds_message_t* restrict this)
/**
+ * Zero initialise a message slot
+ *
+ * @param this Memory slot in which to store the new message
+ */
+void mds_message_zero_initialise(mds_message_t* restrict this)
+{
+ this->headers = NULL;
+ this->header_count = 0;
+ this->payload = NULL;
+ this->payload_size = 0;
+ this->payload_ptr = 0;
+ this->buffer = NULL;
+ this->buffer_size = 0;
+ this->buffer_ptr = 0;
+ this->stage = 0;
+}
+
+
+/**
* Release all resources in a message, should
* be done even if initialisation fails
*