Navigation


Changeset 1103:d8591b1c56cd in freeDiameter for libfdcore/p_cnx.c


Ignore:
Timestamp:
May 10, 2013, 7:48:57 PM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Implemented a few hooks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/p_cnx.c

    r974 r1103  
    236236                        if (FD_IS_LIST_EMPTY(&peer->p_connparams)) {
    237237                                /* We encountered an error or we have looped over all the addresses of the peer. */
    238                                 TRACE_DEBUG(INFO, "Unable to connect to the peer %s, aborting attempts for now.", peer->p_hdr.info.pi_diamid);
     238                                fd_hook_call(HOOK_PEER_CONNECT_FAILED, NULL, peer, "All connection attempts failed, will retry later", NULL);
     239                               
    239240                                CHECK_FCT_DO( fatal_error = fd_event_send(peer->p_events, FDEVP_CNX_FAILED, 0, NULL), goto out );
    240241                                return NULL;
     
    279280                        {
    280281                                /* Handshake failed ...  */
    281                                 TRACE_DEBUG(INFO, "TLS Handshake failed with peer '%s', resetting the connection", peer->p_hdr.info.pi_diamid);
     282                                fd_hook_call(HOOK_PEER_CONNECT_FAILED, NULL, peer, "TLS Handshake failed", NULL);
    282283                                fd_cnx_destroy(cnx);
    283284                                empty_connection_list(peer);
     
    285286                                goto out_pop;
    286287                        } );
     288                LOG_A("%s: TLS handshake successful.", peer->p_hdr.info.pi_diamid);
    287289        } else {
    288290                /* Prepare to receive the next message */
Note: See TracChangeset for help on using the changeset viewer.