diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-05-08 03:58:00 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-05-08 03:58:08 +0200 |
commit | fbd127113629a1eed72d32ffb84572b0d40d8154 (patch) | |
tree | 5d1c4cdf7cf4260943dcd2f5aacae333b3d85e47 /src/mds-server/interception_condition.c | |
parent | split up mds-server structs into their own .h-files and add marshal functions (diff) | |
download | mds-fbd127113629a1eed72d32ffb84572b0d40d8154.tar.gz mds-fbd127113629a1eed72d32ffb84572b0d40d8154.tar.bz2 mds-fbd127113629a1eed72d32ffb84572b0d40d8154.tar.xz |
use the data structure marshallers
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/mds-server/interception_condition.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mds-server/interception_condition.c b/src/mds-server/interception_condition.c index 076bc19..47a082a 100644 --- a/src/mds-server/interception_condition.c +++ b/src/mds-server/interception_condition.c @@ -74,3 +74,20 @@ size_t interception_condition_unmarshal(interception_condition_t* restrict this, return sizeof(size_t) + sizeof(int64_t) + sizeof(int) + n; } + +/** + * Pretend to an interception condition + * + * @param data In buffer with the marshalled data + * @return The number of read bytes + */ +size_t interception_condition_unmarshal_skip(char* restrict data) +{ + size_t n = sizeof(size_t) + sizeof(int64_t) + sizeof(int); + buf_next(data, size_t, 1); + buf_next(data, int64_t, 1); + buf_next(data, int, 1); + n += (strlen(data) + 1) * sizeof(char); + return n; +} + |