summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@zresearch.com>2009-04-16 03:41:54 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-16 17:11:10 +0530
commit6bc3f3c19b9e720ade3702ce409a8a99cc13f1dc (patch)
treeaac6bb4cb60f159ba98c605d06984d53dd4ae7fa /xlators/protocol/server/src
parent8a00ad080cbea0d01470c5f724d7d8ff54b0e254 (diff)
logging enhances to commit d77279ef04ca75ab9715864274567d1ce0ce66a6
- logging made more relevent. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators/protocol/server/src')
-rw-r--r--xlators/protocol/server/src/server-helpers.c6
-rw-r--r--xlators/protocol/server/src/server-protocol.c27
2 files changed, 22 insertions, 11 deletions
diff --git a/xlators/protocol/server/src/server-helpers.c b/xlators/protocol/server/src/server-helpers.c
index dd7e54fb6..c7e7f32d5 100644
--- a/xlators/protocol/server/src/server-helpers.c
+++ b/xlators/protocol/server/src/server-helpers.c
@@ -423,8 +423,6 @@ server_connection_cleanup (xlator_t *this, server_connection_t *conn)
int32_t i = 0;
if (conn == NULL) {
- gf_log (this->name, GF_LOG_DEBUG,
- "connection is NULL");
goto out;
}
@@ -583,8 +581,6 @@ server_connection_destroy (xlator_t *this, server_connection_t *conn)
uint32_t fd_count = 0;
if (conn == NULL) {
- gf_log (this->name, GF_LOG_DEBUG,
- "connection is NULL");
ret = 0;
goto out;
}
@@ -776,8 +772,6 @@ server_connection_put (xlator_t *this, server_connection_t *conn)
server_connection_t *todel = NULL;
if (conn == NULL) {
- gf_log (this->name, GF_LOG_DEBUG,
- "connection is NULL");
goto out;
}
diff --git a/xlators/protocol/server/src/server-protocol.c b/xlators/protocol/server/src/server-protocol.c
index d4d75c1ab..ed75e97eb 100644
--- a/xlators/protocol/server/src/server-protocol.c
+++ b/xlators/protocol/server/src/server-protocol.c
@@ -8253,6 +8253,13 @@ notify (xlator_t *this, int32_t event, void *data, ...)
{
int ret = 0;
transport_t *trans = data;
+ peer_info_t *peerinfo = NULL;
+ peer_info_t *myinfo = NULL;
+
+ if (trans != NULL) {
+ peerinfo = &(trans->peerinfo);
+ myinfo = &(trans->myinfo);
+ }
switch (event) {
case GF_EVENT_POLLIN:
@@ -8260,22 +8267,32 @@ notify (xlator_t *this, int32_t event, void *data, ...)
break;
case GF_EVENT_POLLERR:
{
- peer_info_t *peerinfo = NULL;
-
- peerinfo = &(trans->peerinfo);
gf_log (trans->xl->name, GF_LOG_INFO, "%s disconnected",
peerinfo->identifier);
ret = -1;
transport_disconnect (trans);
- server_connection_cleanup (this, trans->xl_private);
+ if (trans->xl_private == NULL) {
+ gf_log (this->name, GF_LOG_DEBUG,
+ "POLLERR received on (%s) even before "
+ "handshake with (%s) is successful",
+ myinfo->identifier, peerinfo->identifier);
+ } else {
+ server_connection_cleanup (this, trans->xl_private);
+ }
}
break;
case GF_EVENT_TRANSPORT_CLEANUP:
{
- if (trans->xl_private)
+ if (trans->xl_private) {
server_connection_put (this, trans->xl_private);
+ } else {
+ gf_log (this->name, GF_LOG_DEBUG,
+ "transport (%s) cleaned up even before "
+ "handshake with (%s) is successful",
+ myinfo->identifier, peerinfo->identifier);
+ }
}
break;