Mercurial > hg > freeDiameter-dtls
comparison extensions/test_app/ta_cli.c @ 1230:992437a90bda
Enable mix of short and long messages in test_app
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Thu, 20 Jun 2013 11:01:19 +0800 |
parents | c2fbaf2985f4 |
children |
comparison
equal
deleted
inserted
replaced
1229:cf9bad611f90 | 1230:992437a90bda |
---|---|
236 val.i32 = mi->randval; | 236 val.i32 = mi->randval; |
237 CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); | 237 CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); |
238 CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); | 238 CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); |
239 } | 239 } |
240 | 240 |
241 /* Set the Test-Payload-AVP AVP */ | 241 /* Set the Test-Payload-AVP AVP if requested */ |
242 if (ta_conf->long_avp_id) { | 242 if ((ta_conf->long_avp_id) && |
243 (!(ta_conf->mode & MODE_MIXSIZE) || (!(mi->randval & 0x3)))) { | |
243 int l; | 244 int l; |
244 CHECK_FCT_DO( fd_msg_avp_new ( ta_avp_long, 0, &avp ), goto out ); | 245 CHECK_FCT_DO( fd_msg_avp_new ( ta_avp_long, 0, &avp ), goto out ); |
245 CHECK_MALLOC_DO( val.os.data = malloc(ta_conf->long_avp_len), goto out); | 246 CHECK_MALLOC_DO( val.os.data = malloc(ta_conf->long_avp_len), goto out); |
246 val.os.len = ta_conf->long_avp_len; | 247 val.os.len = ta_conf->long_avp_len; |
247 for (l=0; l < ta_conf->long_avp_len; l++) | 248 for (l=0; l < ta_conf->long_avp_len; l++) |