From 6cb00072ac1b8ca8e4504f2aeb55136a3b456447 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 3 May 2014 20:23:39 +0200 Subject: no need to marshal the socket's fd, it is already included in the cmdline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mds-server.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mds-server.c b/src/mds-server.c index 4438397..8c8348a 100644 --- a/src/mds-server.c +++ b/src/mds-server.c @@ -367,15 +367,14 @@ int main(int argc_, char** argv_) message = ((client_t*)(void*)(client_list.values[node]))->message; msg_size += mds_message_marshal_size(&message, 1); } - state_n = sizeof(ssize_t) + 2 * sizeof(int) + 2 * sizeof(size_t); + state_n = sizeof(ssize_t) + 1 * sizeof(int) + 2 * sizeof(size_t); state_n *= list_elements; state_n += msg_size; state_n += 2 * sizeof(int) + 1 * sizeof(sig_atomic_t) + 3 * sizeof(size_t); state_buf = malloc(state_n); state_buf_ = state_buf; ((int*)state_buf_)[0] = MDS_SERVER_VARS_VERSION; - ((int*)state_buf_)[1] = socket_fd; - state_buf_ += 2 * sizeof(int) / sizeof(char); + state_buf_ += 1 * sizeof(int) / sizeof(char); ((sig_atomic_t*)state_buf_)[0] = running; state_buf_ += 1 * sizeof(sig_atomic_t) / sizeof(char); ((size_t*)state_buf_)[0] = list_size; -- cgit v1.2.3-70-g09d2