Navigation


Changeset 1214:c2fbaf2985f4 in freeDiameter for extensions/test_app/ta_serv.c


Ignore:
Timestamp:
Jun 18, 2013, 5:27:45 PM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

New options to test_app extension to generate long Diameter messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/test_app/ta_serv.c

    r1127 r1214  
    9595        }
    9696       
     97        /* Set the Test-Payload-AVP AVP */
     98        if (ta_conf->long_avp_id) {
     99                struct avp * src = NULL;
     100                struct avp_hdr * hdr = NULL;
     101               
     102                CHECK_FCT( fd_msg_search_avp ( qry, ta_avp_long, &src) );
     103                CHECK_FCT( fd_msg_avp_hdr( src, &hdr )  );
     104               
     105                CHECK_FCT( fd_msg_avp_new ( ta_avp_long, 0, &avp ) );
     106                CHECK_FCT( fd_msg_avp_setvalue( avp, hdr->avp_value ) );
     107                CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) );
     108        }
     109       
     110       
    97111        /* Set the Origin-Host, Origin-Realm, Result-Code AVPs */
    98112        CHECK_FCT( fd_msg_rescode_set( ans, "DIAMETER_SUCCESS", NULL, NULL, 1 ) );
Note: See TracChangeset for help on using the changeset viewer.