Navigation



Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/test_app/ta_cli.c

    r924 r740  
    151151        /* Create a new session */
    152152        #define TEST_APP_SID_OPT  "app_test"
    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 );
     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 );
    155154       
    156155        /* Create the random value to store with the session */
     
    165164        /* Now set all AVPs values */
    166165       
     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       
    167179        /* Set the Destination-Realm AVP */
    168180        {
Note: See TracChangeset for help on using the changeset viewer.