Module: kamailio
Branch: master
Commit: 7925c3749b36a24615695b026983862ba03301b0
URL:
https://github.com/kamailio/kamailio/commit/7925c3749b36a24615695b026983862…
Author: Rick Barenthin <rick(a)ng-voice.com>
Committer: Rick Barenthin <rick(a)ng-voice.com>
Date: 2018-11-04T10:48:17+01:00
ims_diameter_server: fixing avp nested list #1686
---
Modified: src/modules/ims_diameter_server/avp_helper.c
---
Diff:
https://github.com/kamailio/kamailio/commit/7925c3749b36a24615695b026983862…
Patch:
https://github.com/kamailio/kamailio/commit/7925c3749b36a24615695b026983862…
---
diff --git a/src/modules/ims_diameter_server/avp_helper.c
b/src/modules/ims_diameter_server/avp_helper.c
index 9f6b67cf2e..9bfde85571 100644
--- a/src/modules/ims_diameter_server/avp_helper.c
+++ b/src/modules/ims_diameter_server/avp_helper.c
@@ -338,8 +338,17 @@ void parselist(AAAMessage *response, AAA_AVP_LIST *list, cJSON *
item, int level
avp_list_s = cdpb.AAAGroupAVPS(avp_list);
cdpb.AAAFreeAVPList(&avp_list);
- diameterserver_add_avp(response, avp_list_s.s, avp_list_s.len,
cJSON_GetObjectItem(item,"avpCode")->valueint, flags,
- cJSON_GetObjectItem(item,"vendorId")->valueint, AVP_FREE_DATA,
__FUNCTION__);
+ if(list) {
+ diameterserver_add_avp_list(list, avp_list_s.s, avp_list_s.len,
+ cJSON_GetObjectItem(item, "avpCode")->valueint, flags,
+ cJSON_GetObjectItem(item, "vendorId")->valueint, AVP_FREE_DATA,
+ __FUNCTION__);
+ } else {
+ diameterserver_add_avp(response, avp_list_s.s, avp_list_s.len,
+ cJSON_GetObjectItem(item, "avpCode")->valueint, flags,
+ cJSON_GetObjectItem(item, "vendorId")->valueint, AVP_FREE_DATA,
+ __FUNCTION__);
+ }
} else if (cJSON_GetObjectItem(item,"int32")) {
set_4bytes(x, cJSON_GetObjectItem(item,"int32")->valueint);
if (list) {