Navigation


Changeset 646:cfc8da9264f4 in freeDiameter for freeDiameter/messages.c


Ignore:
Timestamp:
Jan 4, 2011, 4:20:50 PM (13 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Prepared first part of the changes for #10

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freeDiameter/messages.c

    r116 r646  
    269269        /* Save the callback in the message */
    270270        if (anscb) {
    271                 CHECK_FCT(  fd_msg_anscb_associate( *pmsg, anscb, data )  );
     271                CHECK_FCT(  fd_msg_anscb_associate( *pmsg, anscb, data, NULL /* we should maybe use a safeguard here like 1 hour or so? */ )  );
    272272        }
    273273       
     
    277277        return 0;
    278278}
     279
     280/* The variation of the same function with a timeout callback */
     281int fd_msg_send_timeout ( struct msg ** pmsg, void (*anscb)(void *, struct msg **), void * data, const struct timespec *timeout )
     282{
     283        TRACE_ENTRY("%p %p %p", pmsg, anscb, data, timeout);
     284        CHECK_PARAMS( pmsg && anscb && timeout );
     285       
     286        /* Save the callback in the message, with the timeout */
     287        CHECK_FCT(  fd_msg_anscb_associate( *pmsg, anscb, data, timeout )  );
     288       
     289        /* Post the message in the outgoing queue */
     290        CHECK_FCT( fd_fifo_post(fd_g_outgoing, pmsg) );
     291       
     292        return 0;
     293}
     294
    279295
    280296/* Parse a message against our dictionary, and in case of error log and eventually build the error reply -- returns the parsing status */
Note: See TracChangeset for help on using the changeset viewer.