Navigation


Changeset 1113:eb4ce68b6e5c in freeDiameter for libfdcore/p_sr.c


Ignore:
Timestamp:
May 13, 2013, 8:17:13 PM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Added calls to remaining hooks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/p_sr.c

    r1110 r1113  
    119119        /* If the callback did not dispose of the message, do it now */
    120120        if (ed->request) {
    121                 //fd_msg_log(FD_MSG_LOG_DROPPED, ed->request, "Expiration period completed without an answer, and the expiry callback did not dispose of the message.");
     121                fd_hook_call(HOOK_MESSAGE_DROPPED, ed->request, NULL, "Expiration period completed without an answer, and the expiry callback did not dispose of the message.", fd_msg_pmdl_get(ed->request));
    122122                CHECK_FCT_DO( fd_msg_free(ed->request), /* ignore */ );
    123123        }
     
    323323                                hdr->msg_flags |= CMD_FLAG_RETRANSMIT;
    324324                       
     325                        fd_hook_call(HOOK_MESSAGE_FAILOVER, sr->req, (struct fd_peer *)srlist->srs.o, NULL, fd_msg_pmdl_get(sr->req));
     326                       
    325327                        /* Requeue for sending to another peer */
    326328                        CHECK_FCT_DO( ret = fd_fifo_post(fd_g_outgoing, &sr->req),
    327329                                {
    328                                         //fd_msg_log( FD_MSG_LOG_DROPPED, sr->req, "Internal error: error while requeuing during failover: %s", strerror(ret) );
     330                                        char buf[256];
     331                                        snprintf(buf, sizeof(buf), "Internal error: error while requeuing during failover: %s", strerror(ret));
     332                                        fd_hook_call(HOOK_MESSAGE_DROPPED, sr->req, NULL, buf, fd_msg_pmdl_get(sr->req));
    329333                                        CHECK_FCT_DO(fd_msg_free(sr->req), /* What can we do more? */)
    330334                                });
    331335                } else {
    332336                        /* Just free the request. */
    333                         //fd_msg_log( FD_MSG_LOG_DROPPED, sr->req, "Sent & unanswered local message discarded during failover." );
     337                        /* fd_hook_call(HOOK_MESSAGE_DROPPED, sr->req, NULL, "Sent & unanswered local message discarded during failover.", fd_msg_pmdl_get(sr->req)); */
    334338                        CHECK_FCT_DO(fd_msg_free(sr->req), /* Ignore */);
    335339                }
Note: See TracChangeset for help on using the changeset viewer.