Navigation


Changeset 28:3628f7d2ba88 in freeDiameter for freeDiameter/server.c


Ignore:
Timestamp:
Oct 26, 2009, 6:07:24 PM (15 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

some new functions backbones

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freeDiameter/server.c

    r27 r28  
    139139        CHECK_FCT_DO( fd_msg_parse_buffer( &buf, bufsz, &msg ), /* Parsing failed */ goto cleanup );
    140140       
    141         /* We expect a CER, it must parse with our dictionary */
    142         CHECK_FCT_DO( fd_msg_parse_dict( msg, fd_g_config->cnf_dict ), /* Parsing failed */ goto cleanup );
     141        /* We expect a CER, it must parse with our dictionary and rules */
     142        CHECK_FCT_DO( fd_msg_parse_rules( msg, fd_g_config->cnf_dict, NULL ), /* Parsing failed -- trace details ? */ goto cleanup );
    143143       
    144144        if (TRACE_BOOL(FULL)) {
     
    149149        /* Now check we received a CER */
    150150        CHECK_FCT_DO( fd_msg_hdr ( msg, &hdr ), goto fatal_error );
    151        
    152151        CHECK_PARAMS_DO( (hdr->msg_appl == 0) && (hdr->msg_flags & CMD_FLAG_REQUEST) && (hdr->msg_code == CC_CAPABILITIES_EXCHANGE),
    153152                { fd_log_debug("Connection '%s', expecting CER, received something else, closing...\n", fd_cnx_getid(c->conn)); goto cleanup; } );
    154153       
    155        
    156         TODO("Search matching peer");
    157         TODO("Send event to the peer");
    158        
    159         TODO("(later) handshake or start_clear(.., 1)");
    160         /* The end */
     154        /* Finally, pass the information to the peers module which will handle it next */
     155        CHECK_FCT_DO( fd_peer_handle_newCER( &msg, &c->conn, s->secur ), goto fatal_error );
     156       
     157        /* The end, we cleanup the client structure */
    161158cleanup:
    162159        /* Unlink the client structure */
Note: See TracChangeset for help on using the changeset viewer.