diff options
Diffstat (limited to 'xlators/features/quota/src/quota-enforcer-client.c')
| -rw-r--r-- | xlators/features/quota/src/quota-enforcer-client.c | 14 | 
1 files changed, 13 insertions, 1 deletions
diff --git a/xlators/features/quota/src/quota-enforcer-client.c b/xlators/features/quota/src/quota-enforcer-client.c index 1a4c2e30dd6..097439d86d6 100644 --- a/xlators/features/quota/src/quota-enforcer-client.c +++ b/xlators/features/quota/src/quota-enforcer-client.c @@ -362,16 +362,28 @@ quota_enforcer_notify(struct rpc_clnt *rpc, void *mydata,  {      xlator_t *this = NULL;      int ret = 0; +    quota_priv_t *priv = NULL;      this = mydata; - +    priv = this->private;      switch (event) {          case RPC_CLNT_CONNECT: { +            pthread_mutex_lock(&priv->conn_mutex); +            { +                priv->conn_status = _gf_true; +            } +            pthread_mutex_unlock(&priv->conn_mutex);              gf_msg_trace(this->name, 0, "got RPC_CLNT_CONNECT");              break;          }          case RPC_CLNT_DISCONNECT: { +            pthread_mutex_lock(&priv->conn_mutex); +            { +                priv->conn_status = _gf_false; +                pthread_cond_signal(&priv->conn_cond); +            } +            pthread_mutex_unlock(&priv->conn_mutex);              gf_msg_trace(this->name, 0, "got RPC_CLNT_DISCONNECT");              break;          }  | 
