From 4052c904df1e89d2902d18b45213ccdc3e92cc91 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 8 Jan 2008 14:55:00 -0800 Subject: [PATCH] accept connections properly --- src/kernel/messenger.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/kernel/messenger.c b/src/kernel/messenger.c index 3fec9c7b7ab54..cda4a6c3989af 100644 --- a/src/kernel/messenger.c +++ b/src/kernel/messenger.c @@ -422,8 +422,10 @@ static void prepare_write_accept_ready(struct ceph_connection *con) { con->out_kvec[0].iov_base = &tag_ready; con->out_kvec[0].iov_len = 1; - con->out_kvec_left = 1; - con->out_kvec_bytes = 1; + con->out_kvec[1].iov_base = &con->connect_seq; + con->out_kvec[1].iov_len = sizeof(con->connect_seq); + con->out_kvec_left = 2; + con->out_kvec_bytes = 1 + sizeof(con->connect_seq); con->out_kvec_cur = con->out_kvec; set_bit(WRITE_PENDING, &con->state); } @@ -870,6 +872,7 @@ more: if (con->in_tag == CEPH_MSGR_TAG_READY) { ret = ceph_tcp_recvmsg(con->sock, &con->in_tag, 1); if (ret <= 0) goto done; + dout(30, "try_read got tag %d\n", (int)con->in_tag); if (con->in_tag == CEPH_MSGR_TAG_MSG) prepare_read_message(con); else if (con->in_tag == CEPH_MSGR_TAG_ACK) -- 2.39.5