# HG changeset patch # User Sebastien Decugis # Date 1368496596 -28800 # Node ID 5b4dddbfccb3c8882b42ed7bd3d5534860dd682d # Parent caae38f15dfe80c6339f3336a115eccdda20e96a Clear redundant logs diff -r caae38f15dfe -r 5b4dddbfccb3 libfdcore/p_psm.c --- a/libfdcore/p_psm.c Mon May 13 19:28:17 2013 +0800 +++ b/libfdcore/p_psm.c Tue May 14 09:56:36 2013 +0800 @@ -576,7 +576,6 @@ /* In such case, just discard the message */ char buf[128]; snprintf(buf, sizeof(buf), "Received while peer state machine was in state %s.", STATE_STR(cur_state)); - LOG_E("%s",buf); fd_hook_call(HOOK_MESSAGE_DROPPED, msg, peer, buf, fd_msg_pmdl_get(msg)); fd_msg_free(msg); } @@ -593,7 +592,6 @@ { char buf[256]; snprintf(buf, sizeof(buf), "%s: An unexpected error occurred while parsing a link-local message", peer->p_hdr.info.pi_diamid); - LOG_E("%s",buf); fd_hook_call(HOOK_MESSAGE_DROPPED, msg, peer, buf, fd_msg_pmdl_get(msg)); fd_msg_free(msg); goto psm_end; @@ -606,7 +604,6 @@ char buf[256]; /* Only if an error occurred & the message was not saved / dumped */ snprintf(buf, sizeof(buf), "%s: error sending a message", peer->p_hdr.info.pi_diamid); - LOG_E("%s",buf); fd_hook_call(HOOK_MESSAGE_DROPPED, error, peer, buf, fd_msg_pmdl_get(error)); CHECK_FCT_DO( fd_msg_free(error), goto psm_end); } @@ -614,7 +611,7 @@ char buf[256]; /* We received an invalid answer, let's disconnect */ snprintf(buf, sizeof(buf), "%s: Received invalid answer to Base protocol message, disconnecting...", peer->p_hdr.info.pi_diamid); - LOG_E("%s",buf); + fd_hook_call(HOOK_MESSAGE_DROPPED, msg, peer, buf, fd_msg_pmdl_get(msg)); CHECK_FCT_DO( fd_msg_free(msg), goto psm_end); CHECK_FCT_DO( fd_event_send(peer->p_events, FDEVP_CNX_ERROR, 0, NULL), goto psm_reset ); } @@ -667,7 +664,6 @@ if (msg) { char buf[256]; snprintf(buf, sizeof(buf), "Received un-handled non-routable command from peer '%s'.", peer->p_hdr.info.pi_diamid); - LOG_E("%s",buf); fd_hook_call(HOOK_MESSAGE_DROPPED, msg, NULL, buf, fd_msg_pmdl_get(msg)); CHECK_FCT_DO( fd_msg_free(msg), /* continue */); msg = NULL; @@ -678,7 +674,6 @@ if (msg) { char buf[256]; snprintf(buf, sizeof(buf), "Internal error ('%s'): unhandled message.", peer->p_hdr.info.pi_diamid); - LOG_E("%s",buf); fd_hook_call(HOOK_MESSAGE_DROPPED, msg, NULL, buf, fd_msg_pmdl_get(msg)); fd_msg_free(msg); }