Navigation


Changeset 127:8ee43cf85a5f in freeDiameter for extensions/test_app/ta_cli.c


Ignore:
Timestamp:
Dec 10, 2009, 2:39:55 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Added User-Name AVP in test_app extension

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/test_app/ta_cli.c

    r121 r127  
    196196        CHECK_FCT_DO( fd_msg_add_origin ( req, 0 ), goto out  );
    197197       
     198        /* Set the User-Name AVP if needed*/
     199        if (ta_conf->user_name) {
     200                CHECK_FCT_DO( fd_msg_avp_new ( ta_user_name, 0, &avp ), goto out  );
     201                val.os.data = (unsigned char *)(ta_conf->user_name);
     202                val.os.len  = strlen(ta_conf->user_name);
     203                CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out  );
     204                CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out  );
     205        }
    198206       
    199207        /* Set the Test-AVP AVP */
Note: See TracChangeset for help on using the changeset viewer.