Navigation


Changeset 1214:c2fbaf2985f4 in freeDiameter for extensions/test_app/ta_cli.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_cli.c

    r1088 r1214  
    182182        TRACE_DEBUG(FULL, "Creating a new message for sending.");
    183183       
    184         /* Create the request from template */
     184        /* Create the request */
    185185        CHECK_FCT_DO( fd_msg_new( ta_cmd_r, MSGFL_ALLOC_ETEID, &req ), goto out );
    186186       
     
    239239        }
    240240       
     241        /* Set the Test-Payload-AVP AVP */
     242        if (ta_conf->long_avp_id) {
     243                int l;
     244                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                val.os.len = ta_conf->long_avp_len;
     247                for (l=0; l < ta_conf->long_avp_len; l++)
     248                        val.os.data[l]=l;
     249                CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out  );
     250                free(val.os.data);
     251                CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out  );
     252        }
     253       
    241254        CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &mi->ts), goto out );
    242255       
Note: See TracChangeset for help on using the changeset viewer.