Changeset 1078:74bba7975864 in freeDiameter for libfdcore/p_psm.c
- Timestamp:
- Apr 30, 2013, 4:37:57 PM (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfdcore/p_psm.c
r1033 r1078 241 241 case FDEVP_CNX_INCOMING: { 242 242 struct cnx_incoming * evd = ev->data; 243 fd_msg_log( FD_MSG_LOG_DROPPED, evd->cer, "Message discarded while cleaning peer state machine queue." );243 //fd_msg_log( FD_MSG_LOG_DROPPED, evd->cer, "Message discarded while cleaning peer state machine queue." ); 244 244 CHECK_FCT_DO( fd_msg_free(evd->cer), /* continue */); 245 245 fd_cnx_destroy(evd->cnx); … … 489 489 struct msg * msg = NULL; 490 490 struct msg_hdr * hdr; 491 struct timespec rcvon;492 493 /* Retrieve the piggytailed timestamp */494 memcpy(&rcvon, ev_data+ev_sz, sizeof(struct timespec));495 491 496 492 /* Parse the received buffer */ … … 503 499 } ); 504 500 505 CHECK_FCT_DO( fd_msg_ts_set_recv(msg, &rcvon), /* ... */ );506 507 501 /* If the current state does not allow receiving messages, just drop it */ 508 502 if (cur_state == STATE_CLOSED) { 509 503 /* In such case, just discard the message */ 510 fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Purged from peer '%s''s queue (CLOSED state).", peer->p_hdr.info.pi_diamid );504 //fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Purged from peer '%s''s queue (CLOSED state).", peer->p_hdr.info.pi_diamid ); 511 505 fd_msg_free(msg); 512 506 goto psm_loop; … … 514 508 515 509 /* Log incoming message */ 516 fd_msg_log( FD_MSG_LOG_RECEIVED, msg, "Received %zdb from '%s' (%s)", ev_sz, peer->p_hdr.info.pi_diamid, STATE_STR(cur_state) );510 //fd_msg_log( FD_MSG_LOG_RECEIVED, msg, "Received %zdb from '%s' (%s)", ev_sz, peer->p_hdr.info.pi_diamid, STATE_STR(cur_state) ); 517 511 518 512 /* Extract the header */ … … 525 519 CHECK_FCT_DO( fd_p_sr_fetch(&peer->p_sr, hdr->msg_hbhid, &req), goto psm_end ); 526 520 if (req == NULL) { 527 fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Answer received with no corresponding sent request." );521 //fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Answer received with no corresponding sent request." ); 528 522 fd_msg_free(msg); 529 523 goto psm_loop; … … 535 529 /* Display the delay to receive the answer */ 536 530 { 537 struct timespec reqsent, delay; 538 (void) fd_msg_ts_get_sent(req, &reqsent); 539 TS_DIFFERENCE( &delay, &reqsent, &rcvon ); 540 fd_msg_log( FD_MSG_LOG_TIMING, msg, "Answer received in %ld.%6.6ld sec.", (long)delay.tv_sec, delay.tv_nsec / 1000 ); 531 //fd_msg_log( FD_MSG_LOG_TIMING, msg, "Answer received in %ld.%6.6ld sec.", (long)delay.tv_sec, delay.tv_nsec / 1000 ); 541 532 } 542 533 } else { … … 586 577 default: 587 578 /* In such case, just discard the message */ 588 fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Received from peer '%s' while connection was not in state %s.", peer->p_hdr.info.pi_diamid, STATE_STR(cur_state) );579 //fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Received from peer '%s' while connection was not in state %s.", peer->p_hdr.info.pi_diamid, STATE_STR(cur_state) ); 589 580 fd_msg_free(msg); 590 581 } … … 603 594 if (msg) { 604 595 /* Only if an error occurred & the message was not saved / dumped */ 605 fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Internal error: Problem while sending (%s)", strerror(ret) );596 //fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Internal error: Problem while sending (%s)", strerror(ret) ); 606 597 CHECK_FCT_DO( fd_msg_free(msg), goto psm_end); 607 598 } … … 652 643 /* Cleanup the message if not done */ 653 644 if (msg) { 654 fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Received un-handled non-routable command from peer '%s'.", peer->p_hdr.info.pi_diamid );645 //fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Received un-handled non-routable command from peer '%s'.", peer->p_hdr.info.pi_diamid ); 655 646 CHECK_FCT_DO( fd_msg_free(msg), /* continue */); 656 647 msg = NULL; … … 660 651 /* At this point the message must have been fully handled already */ 661 652 if (msg) { 662 fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Internal error ('%s'): unhandled message.", peer->p_hdr.info.pi_diamid );653 //fd_msg_log( FD_MSG_LOG_DROPPED, msg, "Internal error ('%s'): unhandled message.", peer->p_hdr.info.pi_diamid ); 663 654 fd_msg_free(msg); 664 655 } … … 746 737 } 747 738 if (params->cer) { 748 fd_msg_log( FD_MSG_LOG_DROPPED, params->cer, "Internal error: this CER was not handled as expected." );739 //fd_msg_log( FD_MSG_LOG_DROPPED, params->cer, "Internal error: this CER was not handled as expected." ); 749 740 CHECK_FCT_DO( fd_msg_free(params->cer), ); 750 741 params->cer = NULL;
Note: See TracChangeset
for help on using the changeset viewer.