Skip to content

Commit

Permalink
ims_charging: Fixed setting of AVP
Browse files Browse the repository at this point in the history
  • Loading branch information
carstenbock committed Jan 27, 2016
1 parent 6711306 commit 7387242
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/ims_charging/ims_ro.c
Expand Up @@ -1435,12 +1435,13 @@ static int create_cca_result_code(int result) {
int_str avp_val, avp_name;
avp_name.s.s = RO_AVP_CCA_RESULT_CODE;
avp_name.s.len = RO_AVP_CCA_RESULT_CODE_LENGTH;
char buf[10];

avp_val.n = result;
avp_val.s.s = 0;
avp_val.s.len = 0;
avp_val.s.len = snprintf(buf, 10, "%i", result);
avp_val.s.s = buf;

rc = add_avp(AVP_NAME_STR, avp_name, avp_val);
rc = add_avp(AVP_NAME_STR | AVP_VAL_STR, avp_name, avp_val);

if (rc < 0)
LM_ERR("Couldn't create ["RO_AVP_CCA_RESULT_CODE"] AVP\n");
Expand Down

0 comments on commit 7387242

Please sign in to comment.