Changeset 688:8c3dc8584dab in freeDiameter for libfdcore/routing_dispatch.c
- Timestamp:
- Jan 19, 2011, 7:05:30 PM (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libfdcore/routing_dispatch.c
r686 r688 409 409 410 410 if (!peer) { 411 TRACE_DEBUG(INFO, "Unable to send error '%s' to deleted peer '%s' in reply to:", error_code, id); 412 fd_msg_dump_walk(INFO, *pmsg); 411 fd_msg_log(FD_MSG_LOG_DROPPED, *pmsg, "Unable to send error '%s' to deleted peer '%s' in reply to this message.", error_code, id); 413 412 fd_msg_free(*pmsg); 414 413 *pmsg = NULL; … … 467 466 } 468 467 if (*pmsg) { /* another error happen'd */ 469 TRACE_DEBUG(INFO, "An unexpected error occurred (%s), discarding a message:", strerror(ret)); 470 fd_msg_dump_walk(INFO, *pmsg); 468 fd_msg_log( FD_MSG_LOG_DROPPED, *pmsg, "An unexpected error occurred while parsing the message (%s)", strerror(ret)); 471 469 CHECK_FCT_DO( fd_msg_free(*pmsg), /* continue */); 472 470 *pmsg = NULL; … … 522 520 523 521 if (!is_req) { 524 TRACE_DEBUG(INFO, "Received an answer to a localy issued query, but no handler processed this answer!"); 525 fd_msg_dump_walk(INFO, *pmsg); 522 fd_msg_log( FD_MSG_LOG_DROPPED, *pmsg, "Internal error: Answer received to locally issued request, but not handled by any handler."); 526 523 fd_msg_free(*pmsg); 527 524 *pmsg = NULL; … … 748 745 for ( li = (is_req ? rt_fwd_list.next : rt_fwd_list.prev) ; *pmsg && (li != &rt_fwd_list) ; li = (is_req ? li->next : li->prev) ) { 749 746 struct rt_hdl * rh = (struct rt_hdl *)li; 747 int ret; 750 748 751 749 if (is_req && (rh->dir > RT_FWD_ALL)) … … 756 754 /* Ok, call this cb */ 757 755 TRACE_DEBUG(ANNOYING, "Calling next FWD callback on %p : %p", *pmsg, rh->rt_fwd_cb); 758 CHECK_FCT_DO( (*rh->rt_fwd_cb)(rh->cbdata, pmsg),756 CHECK_FCT_DO( ret = (*rh->rt_fwd_cb)(rh->cbdata, pmsg), 759 757 { 760 TRACE_DEBUG(INFO, "A FWD routing callback returned an error, message discarded."); 761 fd_msg_dump_walk(INFO, *pmsg); 758 fd_msg_log( FD_MSG_LOG_DROPPED, *pmsg, "Internal error: a FWD routing callback returned an error (%s)", strerror(ret)); 762 759 fd_msg_free(*pmsg); 763 760 *pmsg = NULL; … … 817 814 fd_cpu_flush_cache(); 818 815 if ((!peer) || (peer->p_hdr.info.runtime.pir_state != STATE_OPEN)) { 819 TRACE_DEBUG(INFO, "Unable to forward answer message to peer '%s', deleted or not in OPEN state.", qry_src); 820 fd_msg_dump_walk(INFO, *pmsg); 816 fd_msg_log( FD_MSG_LOG_DROPPED, *pmsg, "Unable to forward answer to deleted / closed peer '%s'.", qry_src); 821 817 fd_msg_free(*pmsg); 822 818 *pmsg = NULL; … … 897 893 CHECK_FCT_DO( ret = (*rh->rt_out_cb)(rh->cbdata, *pmsg, candidates), 898 894 { 899 TRACE_DEBUG(INFO, "An OUT routing callback returned an error (%s) ! Message discarded.", strerror(ret)); 900 fd_msg_dump_walk(INFO, *pmsg); 895 fd_msg_log( FD_MSG_LOG_DROPPED, *pmsg, "Internal error: an OUT routing callback returned an error (%s)", strerror(ret)); 901 896 fd_msg_free(*pmsg); 902 897 *pmsg = NULL; … … 947 942 /* If the message has not been sent, return an error */ 948 943 if (*pmsg) { 949 TRACE_DEBUG(INFO, "Could not send the following message, replying with UNABLE_TO_DELIVER"); 950 fd_msg_dump_walk(INFO, *pmsg); 944 fd_msg_log( FD_MSG_LOG_NODELIVER, *pmsg, "No suitable candidate to route the message to." ); 951 945 return_error( pmsg, "DIAMETER_UNABLE_TO_DELIVER", "No suitable candidate to route the message to", NULL); 952 946 }
Note: See TracChangeset
for help on using the changeset viewer.