Navigation


Changeset 1078:74bba7975864 in freeDiameter for libfdcore/routing_dispatch.c


Ignore:
Timestamp:
Apr 30, 2013, 4:37:57 PM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Cleanup the timing data and fd_msg_log feature that will be replaced by the new hooks mechanism. Kept the calls to fd_msg_log in comments to find the locations easily. WORK IN PROGRESS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/routing_dispatch.c

    r1055 r1078  
    393393
    394394                        if (!peer) {
    395                                 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);
     395                                //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);
    396396                                fd_msg_free(*pmsg);
    397397                                *pmsg = NULL;
     
    450450                        }
    451451                        if (msgptr) {   /* another error happen'd */
    452                                 fd_msg_log( FD_MSG_LOG_DROPPED, msgptr,  "An unexpected error occurred while parsing the message (%s)", strerror(ret));
     452                                //fd_msg_log( FD_MSG_LOG_DROPPED, msgptr,  "An unexpected error occurred while parsing the message (%s)", strerror(ret));
    453453                                CHECK_FCT_DO( fd_msg_free(msgptr), /* continue */);
    454454                        }
     
    511511                               
    512512                                if (!is_req) {
    513                                         fd_msg_log( FD_MSG_LOG_DROPPED, msgptr,  "Internal error: Answer received to locally issued request, but not handled by any handler.");
     513                                        //fd_msg_log( FD_MSG_LOG_DROPPED, msgptr,  "Internal error: Answer received to locally issued request, but not handled by any handler.");
    514514                                        fd_msg_free(msgptr);
    515515                                        break;
     
    756756                        CHECK_FCT_DO( ret = (*rh->rt_fwd_cb)(rh->cbdata, &msgptr),
    757757                                {
    758                                         fd_msg_log( FD_MSG_LOG_DROPPED, msgptr, "Internal error: a FWD routing callback returned an error (%s)", strerror(ret));
     758                                        //fd_msg_log( FD_MSG_LOG_DROPPED, msgptr, "Internal error: a FWD routing callback returned an error (%s)", strerror(ret));
    759759                                        fd_msg_free(msgptr);
    760760                                        msgptr = NULL;
     
    815815                CHECK_FCT( fd_peer_getbyid( qry_src, qry_src_len, 0, (void *) &peer ) );
    816816                if (fd_peer_getstate(peer) != STATE_OPEN) {
    817                         fd_msg_log( FD_MSG_LOG_DROPPED, msgptr, "Unable to forward answer to deleted / closed peer '%s'.", qry_src);
     817                        //fd_msg_log( FD_MSG_LOG_DROPPED, msgptr, "Unable to forward answer to deleted / closed peer '%s'.", qry_src);
    818818                        fd_msg_free(msgptr);
    819819                        return 0;
     
    900900                        CHECK_FCT_DO( ret = (*rh->rt_out_cb)(rh->cbdata, msgptr, candidates),
    901901                                {
    902                                         fd_msg_log( FD_MSG_LOG_DROPPED, msgptr, "Internal error: an OUT routing callback returned an error (%s)", strerror(ret));
     902                                        //fd_msg_log( FD_MSG_LOG_DROPPED, msgptr, "Internal error: an OUT routing callback returned an error (%s)", strerror(ret));
    903903                                        fd_msg_free(msgptr);
    904904                                        msgptr = NULL;
     
    948948        /* If the message has not been sent, return an error */
    949949        if (msgptr) {
    950                 fd_msg_log( FD_MSG_LOG_NODELIVER, msgptr, "No suitable candidate to route the message to." );
     950                //fd_msg_log( FD_MSG_LOG_NODELIVER, msgptr, "No suitable candidate to route the message to." );
    951951                return_error( &msgptr, "DIAMETER_UNABLE_TO_DELIVER", "No suitable candidate to route the message to", NULL);
    952952        }
Note: See TracChangeset for help on using the changeset viewer.