summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server-protocol.c
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/server-protocol.c
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/server-protocol.c')
-rw-r--r--xlators/protocol/server/src/server-protocol.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/xlators/protocol/server/src/server-protocol.c b/xlators/protocol/server/src/server-protocol.c
index d4d75c1..ed75e97 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;