Navigation


Changeset 924:877592751fee in freeDiameter for extensions/test_app/ta_bench.c


Ignore:
Timestamp:
Feb 15, 2013, 1:52:57 AM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Children:
925:e5a09fab5ef3, 950:51c15f98a965
Phase:
public
Message:

Fix (tentative) for invalid handling of sessions fast creation/destruction as pointed by Yusuke Okura -- http://lists.freediameter.net/pipermail/help/2013-February/000584.html and http://lists.freediameter.net/pipermail/help/2013-February/000589.html -- Thank you very much

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/test_app/ta_bench.c

    r879 r924  
    122122        union avp_value val;
    123123        struct ta_mess_info * mi = NULL;
    124         struct session *sess = NULL;
    125124       
    126125        TRACE_DEBUG(FULL, "Creating a new message for sending.");
     
    131130        /* Create a new session */
    132131        #define TEST_APP_SID_OPT  "app_testb"
    133         CHECK_FCT_DO( fd_sess_new( &sess, fd_g_config->cnf_diamid, fd_g_config->cnf_diamid_len, (os0_t)TEST_APP_SID_OPT, CONSTSTRLEN(TEST_APP_SID_OPT) ), goto out );
     132        CHECK_FCT_DO( fd_msg_new_session( req, (os0_t)TEST_APP_SID_OPT, CONSTSTRLEN(TEST_APP_SID_OPT) ), goto out );
    134133       
    135134        /* Create the random value to store with the session */
     
    143142       
    144143        /* Now set all AVPs values */
    145        
    146         /* Session-Id */
    147         {
    148                 os0_t sid;
    149                 size_t sidlen;
    150                 CHECK_FCT_DO( fd_sess_getsid ( sess, &sid, &sidlen ), goto out );
    151                 CHECK_FCT_DO( fd_msg_avp_new ( ta_sess_id, 0, &avp ), goto out );
    152                 val.os.data = sid;
    153                 val.os.len  = sidlen;
    154                 CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out );
    155                 CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_FIRST_CHILD, avp ), goto out );
    156                
    157         }
    158144       
    159145        /* Set the Destination-Realm AVP */
Note: See TracChangeset for help on using the changeset viewer.