aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmdsserver
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-06-07 06:54:09 +0200
committerMattias Andrée <maandree@operamail.com>2014-06-07 06:54:09 +0200
commit4bfc519ec26cb6726082ffe5dab6e89dd40ca4bf (patch)
treedc4e9d65100a87b7a96c8eb8a691e96c1817fd64 /src/libmdsserver
parentfix message marshal error (diff)
downloadmds-4bfc519ec26cb6726082ffe5dab6e89dd40ca4bf.tar.gz
mds-4bfc519ec26cb6726082ffe5dab6e89dd40ca4bf.tar.bz2
mds-4bfc519ec26cb6726082ffe5dab6e89dd40ca4bf.tar.xz
fix payload reading (last regression)
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/libmdsserver')
-rw-r--r--src/libmdsserver/mds-message.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmdsserver/mds-message.c b/src/libmdsserver/mds-message.c
index 66e8946..5726b7a 100644
--- a/src/libmdsserver/mds-message.c
+++ b/src/libmdsserver/mds-message.c
@@ -385,7 +385,7 @@ int mds_message_read(mds_message_t* restrict this, int fd)
/* How much of the payload that has not yet been filled. */
size_t need = this->payload_size - this->payload_ptr;
/* How much we have of that what is needed. */
- size_t move = min(this->payload_ptr, need);
+ size_t move = min(this->buffer_ptr, need);
/* Copy what we have, and remove it from the the read buffer. */
memcpy(this->payload + this->payload_ptr, this->buffer, move * sizeof(char));