Module: kamailio
Branch: master
Commit: 54f71b4df5e64a87463098a081b1014458637766
URL:
https://github.com/kamailio/kamailio/commit/54f71b4df5e64a87463098a081b1014…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: GitHub <noreply(a)github.com>
Date: 2018-11-05T14:49:05+01:00
Merge pull request #1707 from dunst0/fix/ims_diameter_server
ims_diameter_server: fixing avp nested list #1686
---
Modified: src/modules/ims_diameter_server/avp_helper.c
---
Diff:
https://github.com/kamailio/kamailio/commit/54f71b4df5e64a87463098a081b1014…
Patch:
https://github.com/kamailio/kamailio/commit/54f71b4df5e64a87463098a081b1014…
---
diff --git a/src/modules/ims_diameter_server/avp_helper.c
b/src/modules/ims_diameter_server/avp_helper.c
index ab3974ac1f..04e2d6d967 100644
--- a/src/modules/ims_diameter_server/avp_helper.c
+++ b/src/modules/ims_diameter_server/avp_helper.c
@@ -342,8 +342,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) {