diff options
Diffstat (limited to 'xlators/protocol/server/src/server-handshake.c')
| -rw-r--r-- | xlators/protocol/server/src/server-handshake.c | 17 | 
1 files changed, 17 insertions, 0 deletions
diff --git a/xlators/protocol/server/src/server-handshake.c b/xlators/protocol/server/src/server-handshake.c index 556b0e21e7f..4aaa933da67 100644 --- a/xlators/protocol/server/src/server-handshake.c +++ b/xlators/protocol/server/src/server-handshake.c @@ -372,6 +372,23 @@ server_setvolume (rpcsvc_request_t *req)          config_params = dict_copy_with_ref (this->options, NULL);          conf          = this->private; +        if (conf->parent_up == _gf_false) { +                /* PARENT_UP indicates that all xlators in graph are inited +                 * successfully +                 */ +                op_ret = -1; +                op_errno = EAGAIN; + +                ret = dict_set_str (reply, "ERROR", +                                    "xlator graph in server is not initialised " +                                    "yet. Try again later"); +                if (ret < 0) +                        gf_msg_debug (this->name, 0, "failed to set error: " +                                      "xlator graph in server is not " +                                      "initialised yet. Try again later"); +                goto fail; +        } +          buf = memdup (args.dict.dict_val, args.dict.dict_len);          if (buf == NULL) {                  op_ret = -1;  | 
