Mercurial > hg > freeDiameter
comparison extensions/test_app/ta_serv.c @ 1214:c2fbaf2985f4
New options to test_app extension to generate long Diameter messages
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Tue, 18 Jun 2013 16:27:45 +0800 |
parents | 1af09cc156d6 |
children |
comparison
equal
deleted
inserted
replaced
1213:b1c4876b1896 | 1214:c2fbaf2985f4 |
---|---|
92 CHECK_FCT( fd_msg_avp_new ( ta_avp, 0, &avp ) ); | 92 CHECK_FCT( fd_msg_avp_new ( ta_avp, 0, &avp ) ); |
93 CHECK_FCT( fd_msg_avp_setvalue( avp, hdr->avp_value ) ); | 93 CHECK_FCT( fd_msg_avp_setvalue( avp, hdr->avp_value ) ); |
94 CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); | 94 CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); |
95 } | 95 } |
96 | 96 |
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 | |
97 /* Set the Origin-Host, Origin-Realm, Result-Code AVPs */ | 111 /* Set the Origin-Host, Origin-Realm, Result-Code AVPs */ |
98 CHECK_FCT( fd_msg_rescode_set( ans, "DIAMETER_SUCCESS", NULL, NULL, 1 ) ); | 112 CHECK_FCT( fd_msg_rescode_set( ans, "DIAMETER_SUCCESS", NULL, NULL, 1 ) ); |
99 | 113 |
100 /* Send the answer */ | 114 /* Send the answer */ |
101 CHECK_FCT( fd_msg_send( msg, NULL, NULL ) ); | 115 CHECK_FCT( fd_msg_send( msg, NULL, NULL ) ); |