Navigation


Changeset 706:4ffbc9f1e922 in freeDiameter for extensions/test_app/ta_cli.c


Ignore:
Timestamp:
Feb 9, 2011, 3:26:58 PM (13 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Large UNTESTED commit with the following changes:

  • Improved DiameterIdentity? handling (esp. interationalization issues), and improve efficiency of some string operations in peers, sessions, and dictionary modules (closes #7)
  • Cleanup in the session module to free only unreferenced sessions (#16)
  • Removed fd_cpu_flush_cache(), replaced by more robust alternatives.
  • Improved peer state machine algorithm to counter SCTP multistream race condition.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/test_app/ta_cli.c

    r662 r706  
    150150       
    151151        /* Create a new session */
    152         CHECK_FCT_DO( fd_sess_new( &sess, fd_g_config->cnf_diamid, "app_test", 8 ), goto out );
     152        #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 );
    153154       
    154155        /* Create the random value to store with the session */
     
    165166        /* Session-Id */
    166167        {
    167                 char * sid;
    168                 CHECK_FCT_DO( fd_sess_getsid ( sess, &sid ), goto out );
     168                os0_t sid;
     169                size_t sidlen;
     170                CHECK_FCT_DO( fd_sess_getsid ( sess, &sid, &sidlen ), goto out );
    169171                CHECK_FCT_DO( fd_msg_avp_new ( ta_sess_id, 0, &avp ), goto out );
    170                 val.os.data = (uint8_t *)sid;
    171                 val.os.len  = strlen(sid);
     172                val.os.data = sid;
     173                val.os.len  = sidlen;
    172174                CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out );
    173175                CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_FIRST_CHILD, avp ), goto out );
Note: See TracChangeset for help on using the changeset viewer.