aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-server/queued_interception.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-05-19 01:49:53 +0200
committerMattias Andrée <maandree@operamail.com>2014-05-19 01:49:58 +0200
commit198e8ee15037d1de39a3d23d3bf579fed0561ba3 (patch)
tree05739bf7d251f1af6c1c9110cb98201c10bf7848 /src/mds-server/queued_interception.c
parentDo not just queue "Client close" message, but also send it (diff)
downloadmds-198e8ee15037d1de39a3d23d3bf579fed0561ba3.tar.gz
mds-198e8ee15037d1de39a3d23d3bf579fed0561ba3.tar.bz2
mds-198e8ee15037d1de39a3d23d3bf579fed0561ba3.tar.xz
store structure version for all structures when marshalling
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/mds-server/queued_interception.c')
-rw-r--r--src/mds-server/queued_interception.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mds-server/queued_interception.c b/src/mds-server/queued_interception.c
index 56d58c3..d162558 100644
--- a/src/mds-server/queued_interception.c
+++ b/src/mds-server/queued_interception.c
@@ -28,7 +28,7 @@
*/
size_t queued_interception_marshal_size(void)
{
- return sizeof(int64_t) + 2 * sizeof(int);
+ return sizeof(int64_t) + 3 * sizeof(int);
}
@@ -41,6 +41,7 @@ size_t queued_interception_marshal_size(void)
*/
size_t queued_interception_marshal(const queued_interception_t* restrict this, char* restrict data)
{
+ buf_set_next(data, int, QUEUED_INTERCEPTION_T_VERSION);
buf_set_next(data, int64_t, this->priority);
buf_set_next(data, int, this->modifying);
buf_set_next(data, int, this->client->socket_fd);
@@ -58,6 +59,8 @@ size_t queued_interception_marshal(const queued_interception_t* restrict this, c
size_t queued_interception_unmarshal(queued_interception_t* restrict this, char* restrict data)
{
this->client = NULL;
+ /* buf_get_next(data, int, QUEUED_INTERCEPTION_T_VERSION); */
+ buf_next(data, int, 1);
buf_get_next(data, int64_t, this->priority);
buf_get_next(data, int, this->modifying);
buf_get_next(data, int, this->socket_fd);