From 566054194d82b4bfabaaca44d14008a073e29a6b Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 15 May 2014 15:45:13 +0200 Subject: m + fix message sending MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mds-server/mds-server.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mds-server/mds-server.c') diff --git a/src/mds-server/mds-server.c b/src/mds-server/mds-server.c index d0757fd..b774e77 100644 --- a/src/mds-server/mds-server.c +++ b/src/mds-server/mds-server.c @@ -871,6 +871,7 @@ int message_received(client_t* client) { perror(*argv); free(old_buf); + pthread_mutex_unlock(&(client->mutex)); return 0; } } @@ -896,13 +897,13 @@ int message_received(client_t* client) /* Multicast the message. */ - n = mds_message_marshal_size(&message, 0); + n = mds_message_compose_size(&message); if ((msgbuf = malloc(n)) == NULL) { perror(*argv); return 0; } - mds_message_marshal(&message, msgbuf, 0); + mds_message_compose(&message, msgbuf); queue_message_multicast(msgbuf, n / sizeof(char), client); -- cgit v1.2.3-70-g09d2