Module: kamailio
Branch: master
Commit: 73872420188b2eb0a5adb51a03a3c17baec1a331
URL:
https://github.com/kamailio/kamailio/commit/73872420188b2eb0a5adb51a03a3c17…
Author: Carsten Bock <carsten(a)ng-voice.com>
Committer: Carsten Bock <carsten(a)ng-voice.com>
Date: 2016-01-27T10:16:06+01:00
ims_charging: Fixed setting of AVP
---
Modified: modules/ims_charging/ims_ro.c
---
Diff:
https://github.com/kamailio/kamailio/commit/73872420188b2eb0a5adb51a03a3c17…
Patch:
https://github.com/kamailio/kamailio/commit/73872420188b2eb0a5adb51a03a3c17…
---
diff --git a/modules/ims_charging/ims_ro.c b/modules/ims_charging/ims_ro.c
index e011036..dc36349 100644
--- a/modules/ims_charging/ims_ro.c
+++ b/modules/ims_charging/ims_ro.c
@@ -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");