mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-05 07:08:11 +00:00
[Release-17] Upgrade SBI to v17.x.0
This commit is contained in:
parent
969c116e77
commit
4d44b1843e
1687 changed files with 121604 additions and 9310 deletions
|
|
@ -7,7 +7,8 @@
|
|||
OpenAPI_confirmation_data_response_t *OpenAPI_confirmation_data_response_create(
|
||||
OpenAPI_auth_result_e auth_result,
|
||||
char *supi,
|
||||
char *kseaf
|
||||
char *kseaf,
|
||||
OpenAPI_list_t *pvs_info
|
||||
)
|
||||
{
|
||||
OpenAPI_confirmation_data_response_t *confirmation_data_response_local_var = ogs_malloc(sizeof(OpenAPI_confirmation_data_response_t));
|
||||
|
|
@ -16,6 +17,7 @@ OpenAPI_confirmation_data_response_t *OpenAPI_confirmation_data_response_create(
|
|||
confirmation_data_response_local_var->auth_result = auth_result;
|
||||
confirmation_data_response_local_var->supi = supi;
|
||||
confirmation_data_response_local_var->kseaf = kseaf;
|
||||
confirmation_data_response_local_var->pvs_info = pvs_info;
|
||||
|
||||
return confirmation_data_response_local_var;
|
||||
}
|
||||
|
|
@ -35,6 +37,13 @@ void OpenAPI_confirmation_data_response_free(OpenAPI_confirmation_data_response_
|
|||
ogs_free(confirmation_data_response->kseaf);
|
||||
confirmation_data_response->kseaf = NULL;
|
||||
}
|
||||
if (confirmation_data_response->pvs_info) {
|
||||
OpenAPI_list_for_each(confirmation_data_response->pvs_info, node) {
|
||||
OpenAPI_server_addressing_info_free(node->data);
|
||||
}
|
||||
OpenAPI_list_free(confirmation_data_response->pvs_info);
|
||||
confirmation_data_response->pvs_info = NULL;
|
||||
}
|
||||
ogs_free(confirmation_data_response);
|
||||
}
|
||||
|
||||
|
|
@ -72,6 +81,22 @@ cJSON *OpenAPI_confirmation_data_response_convertToJSON(OpenAPI_confirmation_dat
|
|||
}
|
||||
}
|
||||
|
||||
if (confirmation_data_response->pvs_info) {
|
||||
cJSON *pvs_infoList = cJSON_AddArrayToObject(item, "pvsInfo");
|
||||
if (pvs_infoList == NULL) {
|
||||
ogs_error("OpenAPI_confirmation_data_response_convertToJSON() failed [pvs_info]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_for_each(confirmation_data_response->pvs_info, node) {
|
||||
cJSON *itemLocal = OpenAPI_server_addressing_info_convertToJSON(node->data);
|
||||
if (itemLocal == NULL) {
|
||||
ogs_error("OpenAPI_confirmation_data_response_convertToJSON() failed [pvs_info]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToArray(pvs_infoList, itemLocal);
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
return item;
|
||||
}
|
||||
|
|
@ -84,6 +109,8 @@ OpenAPI_confirmation_data_response_t *OpenAPI_confirmation_data_response_parseFr
|
|||
OpenAPI_auth_result_e auth_resultVariable = 0;
|
||||
cJSON *supi = NULL;
|
||||
cJSON *kseaf = NULL;
|
||||
cJSON *pvs_info = NULL;
|
||||
OpenAPI_list_t *pvs_infoList = NULL;
|
||||
auth_result = cJSON_GetObjectItemCaseSensitive(confirmation_data_responseJSON, "authResult");
|
||||
if (!auth_result) {
|
||||
ogs_error("OpenAPI_confirmation_data_response_parseFromJSON() failed [auth_result]");
|
||||
|
|
@ -111,14 +138,47 @@ OpenAPI_confirmation_data_response_t *OpenAPI_confirmation_data_response_parseFr
|
|||
}
|
||||
}
|
||||
|
||||
pvs_info = cJSON_GetObjectItemCaseSensitive(confirmation_data_responseJSON, "pvsInfo");
|
||||
if (pvs_info) {
|
||||
cJSON *pvs_info_local = NULL;
|
||||
if (!cJSON_IsArray(pvs_info)) {
|
||||
ogs_error("OpenAPI_confirmation_data_response_parseFromJSON() failed [pvs_info]");
|
||||
goto end;
|
||||
}
|
||||
|
||||
pvs_infoList = OpenAPI_list_create();
|
||||
|
||||
cJSON_ArrayForEach(pvs_info_local, pvs_info) {
|
||||
if (!cJSON_IsObject(pvs_info_local)) {
|
||||
ogs_error("OpenAPI_confirmation_data_response_parseFromJSON() failed [pvs_info]");
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_server_addressing_info_t *pvs_infoItem = OpenAPI_server_addressing_info_parseFromJSON(pvs_info_local);
|
||||
if (!pvs_infoItem) {
|
||||
ogs_error("No pvs_infoItem");
|
||||
OpenAPI_list_free(pvs_infoList);
|
||||
goto end;
|
||||
}
|
||||
OpenAPI_list_add(pvs_infoList, pvs_infoItem);
|
||||
}
|
||||
}
|
||||
|
||||
confirmation_data_response_local_var = OpenAPI_confirmation_data_response_create (
|
||||
auth_resultVariable,
|
||||
supi && !cJSON_IsNull(supi) ? ogs_strdup(supi->valuestring) : NULL,
|
||||
kseaf && !cJSON_IsNull(kseaf) ? ogs_strdup(kseaf->valuestring) : NULL
|
||||
kseaf && !cJSON_IsNull(kseaf) ? ogs_strdup(kseaf->valuestring) : NULL,
|
||||
pvs_info ? pvs_infoList : NULL
|
||||
);
|
||||
|
||||
return confirmation_data_response_local_var;
|
||||
end:
|
||||
if (pvs_infoList) {
|
||||
OpenAPI_list_for_each(pvs_infoList, node) {
|
||||
OpenAPI_server_addressing_info_free(node->data);
|
||||
}
|
||||
OpenAPI_list_free(pvs_infoList);
|
||||
pvs_infoList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue