aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcoopgamma.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-07-14 20:50:06 +0200
committerMattias Andrée <maandree@kth.se>2016-07-14 20:50:06 +0200
commit8a3974f823a46006808322d506c2279fd27e66a0 (patch)
treea8dfef5760fb399f415d73fbe285ea10f422575e /src/libcoopgamma.c
parentImplement initialise, destroy, marshal, and unmarshal functions (diff)
downloadlibcoopgamma-8a3974f823a46006808322d506c2279fd27e66a0.tar.gz
libcoopgamma-8a3974f823a46006808322d506c2279fd27e66a0.tar.bz2
libcoopgamma-8a3974f823a46006808322d506c2279fd27e66a0.tar.xz
m + add prototypes for functions for communicating with the server
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/libcoopgamma.c')
-rw-r--r--src/libcoopgamma.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libcoopgamma.c b/src/libcoopgamma.c
index 5f71891..b6989f3 100644
--- a/src/libcoopgamma.c
+++ b/src/libcoopgamma.c
@@ -692,6 +692,7 @@ size_t libcoopgamma_error_marshal(const libcoopgamma_error_t* restrict this, voi
marshal_version(LIBCOOPGAMMA_ERROR_VERSION);
marshal_prim(this->number, uint64_t);
marshal_prim(this->custom, int);
+ marshal_prim(this->server_side, int);
marshal_string(this->description);
MARSHAL_EPILOGUE;
}
@@ -730,6 +731,7 @@ int libcoopgamma_context_initialise(libcoopgamma_context_t* restrict this)
{
this->fd = -1;
libcoopgamma_error_initialise(&(this->error));
+ this->message_id = 0;
return 0;
}
@@ -771,6 +773,7 @@ size_t libcoopgamma_context_marshal(const libcoopgamma_context_t* restrict this,
marshal_version(LIBCOOPGAMMA_CONTEXT_VERSION);
marshal_prim(this->fd, int);
off += libcoopgamma_error_marshal(&(this->error), SUBBUF);
+ marshal_prim(this->message_id, uint32_t);
MARSHAL_EPILOGUE;
}
@@ -797,6 +800,7 @@ int libcoopgamma_context_unmarshal(libcoopgamma_context_t* restrict this,
if (r != LIBCOOPGAMMA_SUCCESS)
return r;
off += n;
+ unmarshal_prim(this->message_id, uint32_t);
UNMARSHAL_EPILOGUE;
}