Navigation


Changeset 1186:56c36d1007b4 in freeDiameter for libfdcore/p_out.c


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

Further preparation of the DTLS integration. Some cleanups in the GNUTLS handling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/p_out.c

    r1119 r1186  
    3737
    3838/* Alloc a new hbh for requests, bufferize the message and send on the connection, save in sentreq if provided */
    39 static int do_send(struct msg ** msg, uint32_t flags, struct cnxctx * cnx, uint32_t * hbh, struct fd_peer * peer)
     39static int do_send(struct msg ** msg, struct cnxctx * cnx, uint32_t * hbh, struct fd_peer * peer)
    4040{
    4141        struct msg_hdr * hdr;
     
    4747        struct msg *cpy_for_logs_only;
    4848       
    49         TRACE_ENTRY("%p %x %p %p %p", msg, flags, cnx, hbh, peer);
     49        TRACE_ENTRY("%p %p %p %p", msg, cnx, hbh, peer);
    5050       
    5151        /* Retrieve the message header */
     
    7676       
    7777        /* Send the message */
    78         CHECK_FCT_DO( ret = fd_cnx_send(cnx, buf, sz, flags), );
     78        CHECK_FCT_DO( ret = fd_cnx_send(cnx, buf, sz), );
    7979out:
    8080        ;       
     
    128128               
    129129                /* Send the message, log any error */
    130                 CHECK_FCT_DO( ret = do_send(&msg, 0, peer->p_cnxctx, &peer->p_hbh, peer),
     130                CHECK_FCT_DO( ret = do_send(&msg, peer->p_cnxctx, &peer->p_hbh, peer),
    131131                        {
    132132                                if (msg) {
     
    149149
    150150/* Wrapper to sending a message either by out thread (peer in OPEN state) or directly; cnx or peer must be provided. Flags are valid only for direct sending, not through thread (unused) */
    151 int fd_out_send(struct msg ** msg, struct cnxctx * cnx, struct fd_peer * peer, uint32_t flags)
     151int fd_out_send(struct msg ** msg, struct cnxctx * cnx, struct fd_peer * peer)
    152152{
    153153        struct msg_hdr * hdr;
    154154       
    155         TRACE_ENTRY("%p %p %p %x", msg, cnx, peer, flags);
     155        TRACE_ENTRY("%p %p %p", msg, cnx, peer);
    156156        CHECK_PARAMS( msg && *msg && (cnx || (peer && peer->p_cnxctx)));
    157157       
     
    182182
    183183                /* Do send the message */
    184                 CHECK_FCT_DO( ret = do_send(msg, flags, cnx, hbh, peer),
     184                CHECK_FCT_DO( ret = do_send(msg, cnx, hbh, peer),
    185185                        {
    186186                                if (msg) {
     
    205205        CHECK_POSIX( pthread_create(&peer->p_outthr, NULL, out_thr, peer) );
    206206       
     207        CHECK_FCT( fd_cnx_unordered_delivery(peer->p_cnxctx, 1) );
     208       
    207209        return 0;
    208210}
     
    214216        CHECK_PARAMS( CHECK_PEER(peer) );
    215217       
     218        CHECK_FCT( fd_cnx_unordered_delivery(peer->p_cnxctx, 0) );
     219       
    216220        CHECK_FCT( fd_thr_term(&peer->p_outthr) );
    217221       
Note: See TracChangeset for help on using the changeset viewer.