3604df
From 5698418061f736dc68aef445608641dbeca2d4a8 Mon Sep 17 00:00:00 2001
3604df
From: moagrawa <moagrawa@redhat.com>
3604df
Date: Wed, 12 Oct 2016 17:04:16 +0530
3604df
Subject: [PATCH 096/141] socket: log the client identifier in ssl connect
3604df
3604df
Problem: client identifier is not logged in message in ssl_setup_connection
3604df
3604df
Solutuion: In ssl_setup_connection xl_private is not available in rpc_transport
3604df
           so changed to this peerinfo.identifier.
3604df
3604df
> BUG: 1380275
3604df
> Change-Id: I05006a3d63e46de8c388298c22faa9a3329eb6f3
3604df
> Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
3604df
> Reviewed-on: http://review.gluster.org/15596
3604df
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
3604df
> Smoke: Gluster Build System <jenkins@build.gluster.org>
3604df
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
3604df
> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
3604df
> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
3604df
> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
3604df
> (cherry picked from commit 2e23c62cc50037c8e61bcd9c04348409e7627181)
3604df
3604df
BUG: 1333885
3604df
Change-Id: I3ab189723e1a3739a3942850956c57914b4b6a0a
3604df
Signed-off-by: moagrawa <moagrawa@redhat.com>
3604df
Reviewed-on: https://code.engineering.redhat.com/gerrit/86906
3604df
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
3604df
Tested-by: Atin Mukherjee <amukherj@redhat.com>
3604df
---
3604df
 rpc/rpc-transport/socket/src/socket.c |    4 ++--
3604df
 1 files changed, 2 insertions(+), 2 deletions(-)
3604df
3604df
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
3604df
index d9383c3..f13d9b7 100644
3604df
--- a/rpc/rpc-transport/socket/src/socket.c
3604df
+++ b/rpc/rpc-transport/socket/src/socket.c
3604df
@@ -343,14 +343,14 @@ ssl_setup_connection (rpc_transport_t *this, int server)
3604df
 	gf_log(this->name,GF_LOG_INFO,"peer CN = %s", peer_CN);
3604df
         gf_log (this->name, GF_LOG_INFO,
3604df
                 "SSL verification succeeded (client: %s)",
3604df
-                this->xl_private?this->xl_private->client_uid:"");
3604df
+                this->peerinfo.identifier);
3604df
         return gf_strdup(peer_CN);
3604df
 
3604df
 	/* Error paths. */
3604df
 ssl_error:
3604df
 	gf_log (this->name, GF_LOG_ERROR,
3604df
                 "SSL connect error (client: %s)",
3604df
-                this->xl_private?this->xl_private->client_uid:"");
3604df
+                this->peerinfo.identifier);
3604df
 	ssl_dump_error_stack(this->name);
3604df
 free_ssl:
3604df
 	SSL_free(priv->ssl_ssl);
3604df
-- 
3604df
1.7.1
3604df