Navigation


Changeset 924:877592751fee in freeDiameter for extensions/test_app/ta_cli.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_cli.c

    r740 r924  
    151151        /* Create a new session */
    152152        #define TEST_APP_SID_OPT  "app_test"
    153         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 );
     153        CHECK_FCT_DO( fd_msg_new_session( req, (os0_t)TEST_APP_SID_OPT, CONSTSTRLEN(TEST_APP_SID_OPT) ), goto out );
     154        CHECK_FCT_DO( fd_msg_sess_get(fd_g_config->cnf_dict, req, &sess, NULL), goto out );
    154155       
    155156        /* Create the random value to store with the session */
     
    164165        /* Now set all AVPs values */
    165166       
    166         /* Session-Id */
    167         {
    168                 os0_t sid;
    169                 size_t sidlen;
    170                 CHECK_FCT_DO( fd_sess_getsid ( sess, &sid, &sidlen ), goto out );
    171                 CHECK_FCT_DO( fd_msg_avp_new ( ta_sess_id, 0, &avp ), goto out );
    172                 val.os.data = sid;
    173                 val.os.len  = sidlen;
    174                 CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out );
    175                 CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_FIRST_CHILD, avp ), goto out );
    176                
    177         }
    178        
    179167        /* Set the Destination-Realm AVP */
    180168        {
Note: See TracChangeset for help on using the changeset viewer.