diff options
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handshake.c | 7 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-store.c | 3 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 10 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volume-ops.c | 2 |
4 files changed, 11 insertions, 11 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handshake.c b/xlators/mgmt/glusterd/src/glusterd-handshake.c index 35b6bed409e..f2614f4db86 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handshake.c +++ b/xlators/mgmt/glusterd/src/glusterd-handshake.c @@ -1828,9 +1828,10 @@ gd_validate_peer_op_version (xlator_t *this, glusterd_peerinfo_t *peerinfo, ret = 0; out: - gf_msg_debug ((this ? this->name : "glusterd") , 0, "Peer %s %s", - peerinfo->hostname, ((ret < 0) ? "rejected" : "accepted") - ); + if (peerinfo) + gf_msg_debug ((this ? this->name : "glusterd") , 0, "Peer %s %s", + peerinfo->hostname, + ((ret < 0) ? "rejected" : "accepted")); return ret; } diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index 47d74e8c284..570ff85df5a 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.c +++ b/xlators/mgmt/glusterd/src/glusterd-store.c @@ -4221,7 +4221,8 @@ out: gf_store_handle_destroy (peerinfo->shandle); peerinfo->shandle = NULL; } - gf_msg_debug (this->name, 0, "Returning with %d", ret); + gf_msg_debug ((this ? this->name : "glusterd"), 0, "Returning with %d", + ret); return ret; } diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index dc8e1bdfd80..d791dc3b977 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -5243,6 +5243,10 @@ glusterd_add_node_to_dict (char *server, dict_t *dict, int count, svc = &(priv->bitd_svc); else if (strcmp(server, priv->scrub_svc.name) == 0) svc = &(priv->scrub_svc); + else { + ret = 0; + goto out; + } //Consider service to be running only when glusterd sees it Online if (svc->online) @@ -5258,11 +5262,6 @@ glusterd_add_node_to_dict (char *server, dict_t *dict, int count, * when output. */ - if (!strcmp(server, "")) { - ret = 0; - goto out; - } - snprintf (key, sizeof (key), "brick%d.hostname", count); if (!strcmp (server, priv->nfs_svc.name)) ret = dict_set_str (dict, key, "NFS Server"); @@ -5313,7 +5312,6 @@ glusterd_add_node_to_dict (char *server, dict_t *dict, int count, if (ret) goto out; - out: gf_msg_debug (THIS->name, 0, "Returning %d", ret); return ret; diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c index ec4c699c471..b6cef79df7f 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c @@ -974,7 +974,7 @@ out: if (op_errstr[0] == '\0') snprintf (op_errstr, sizeof (op_errstr), "operation failed"); - gf_msg (this->name, GF_LOG_ERROR, 0, + gf_msg ((this ? this->name : "glusterd"), GF_LOG_ERROR, 0, GD_MSG_GLUSTERD_OP_FAILED, "%s", op_errstr); ret = glusterd_op_send_cli_response (cli_op, ret, 0, req, dict, op_errstr); |