diff options
author | Amar Tumballi <amar@gluster.com> | 2010-07-23 03:13:48 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-07-23 04:28:53 -0700 |
commit | dbab7f87b6fbcc4d1f518e6f98101331df51ce4a (patch) | |
tree | b22ee90a8823f98f99d178185756ccac8a83e15e /xlators/protocol/client/src/client-handshake.c | |
parent | 9c2753d1bee735cb74968106c7ce8ca1460504c6 (diff) |
client protocol should send the fops only after handshake
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 1195 (crash in protocol server due to unauthenticated fop request..)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1195
Diffstat (limited to 'xlators/protocol/client/src/client-handshake.c')
-rw-r--r-- | xlators/protocol/client/src/client-handshake.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c index 31690ef17b8..69035d458ba 100644 --- a/xlators/protocol/client/src/client-handshake.c +++ b/xlators/protocol/client/src/client-handshake.c @@ -188,6 +188,8 @@ client_start_ping (void *data) ret = client_submit_request (this, NULL, frame, conf->handshake, GF_HNDSK_PING, client_ping_cbk, NULL, NULL); + if (ret) + goto fail; return; fail: @@ -292,6 +294,7 @@ int32_t client3_getspec (call_frame_t *frame, xlator_t *this, void *data) clnt_args_t *args = NULL; gf_getspec_req req = {0,}; int op_errno = ESTALE; + int ret = 0; if (!frame || !this || !data) goto unwind; @@ -301,9 +304,12 @@ int32_t client3_getspec (call_frame_t *frame, xlator_t *this, void *data) req.flags = args->flags; req.key = (char *)args->name; - client_submit_request (this, &req, frame, conf->handshake, GF_HNDSK_GETSPEC, + ret = client_submit_request (this, &req, frame, conf->handshake, GF_HNDSK_GETSPEC, client3_getspec_cbk, NULL, xdr_from_getspec_req); + if (ret) + goto unwind; + return 0; unwind: STACK_UNWIND_STRICT (getspec, frame, -1, op_errno, NULL); @@ -475,6 +481,7 @@ client_setvolume_cbk (struct rpc_req *req, struct iovec *iov, int count, void *m op_ret = 0; conf->connecting = 0; + conf->connected = 1; /* TODO: more to test */ client_post_handshake (frame, frame->this); |