diff options
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/protocol/server/src/server.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c index 4fa686146a2..9cfc556553b 100644 --- a/xlators/protocol/server/src/server.c +++ b/xlators/protocol/server/src/server.c @@ -438,16 +438,16 @@ server_rpc_notify(rpcsvc_t *rpc, void *xl, rpcsvc_event_t event, void *data) uint64_t xprtrefcount = 0; gf_boolean_t fd_exist = _gf_false; - if (!xl || !data) { + this = xl; + trans = data; + conf = this->private; + + if (!this || !data || !this->ctx || !this->ctx->active) { gf_msg_callingfn("server", GF_LOG_WARNING, 0, PS_MSG_RPC_NOTIFY_ERROR, "Calling rpc_notify without initializing"); goto out; } - this = xl; - trans = data; - conf = this->private; - switch (event) { case RPCSVC_EVENT_ACCEPT: { /* Have a structure per new connection */ |