From 94709157bc2c1b258d8b295d2b84c1bb72fd61fa Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 12 May 2011 14:18:42 -0700 Subject: [PATCH] --- yaml --- r: 251302 b: refs/heads/master c: e8f54ce169125a2e59330fac25ad3c9ac0ce22a5 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/ceph/messenger.c | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index ccc74cd00f29..75663ce89c52 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1b36698577c1008dc1e63f0bf4b6f3d9deada94a +refs/heads/master: e8f54ce169125a2e59330fac25ad3c9ac0ce22a5 diff --git a/trunk/net/ceph/messenger.c b/trunk/net/ceph/messenger.c index b140dd3515de..ce326c806237 100644 --- a/trunk/net/ceph/messenger.c +++ b/trunk/net/ceph/messenger.c @@ -619,11 +619,12 @@ static int prepare_connect_authorizer(struct ceph_connection *con) con->out_connect.authorizer_protocol = cpu_to_le32(auth_protocol); con->out_connect.authorizer_len = cpu_to_le32(auth_len); - con->out_kvec[con->out_kvec_left].iov_base = auth_buf; - con->out_kvec[con->out_kvec_left].iov_len = auth_len; - con->out_kvec_left++; - con->out_kvec_bytes += auth_len; - + if (auth_len) { + con->out_kvec[con->out_kvec_left].iov_base = auth_buf; + con->out_kvec[con->out_kvec_left].iov_len = auth_len; + con->out_kvec_left++; + con->out_kvec_bytes += auth_len; + } return 0; }