Navigation


Changeset 706:4ffbc9f1e922 in freeDiameter for extensions/test_app/ta_bench.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_bench.c

    r662 r706  
    130130       
    131131        /* Create a new session */
    132         CHECK_FCT_DO( fd_sess_new( &sess, fd_g_config->cnf_diamid, "app_test", 8 ), goto out );
     132        #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 );
    133134       
    134135        /* Create the random value to store with the session */
     
    145146        /* Session-Id */
    146147        {
    147                 char * sid;
    148                 CHECK_FCT_DO( fd_sess_getsid ( sess, &sid ), goto out );
     148                os0_t sid;
     149                size_t sidlen;
     150                CHECK_FCT_DO( fd_sess_getsid ( sess, &sid, &sidlen ), goto out );
    149151                CHECK_FCT_DO( fd_msg_avp_new ( ta_sess_id, 0, &avp ), goto out );
    150                 val.os.data = (uint8_t *)sid;
    151                 val.os.len  = strlen(sid);
     152                val.os.data = sid;
     153                val.os.len  = sidlen;
    152154                CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out );
    153155                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.