mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-04 14:20:09 +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
|
|
@ -5,13 +5,15 @@
|
|||
#include "trigger_request.h"
|
||||
|
||||
OpenAPI_trigger_request_t *OpenAPI_trigger_request_create(
|
||||
char *supi
|
||||
char *supi,
|
||||
OpenAPI_pcscf_address_t *failed_pcscf
|
||||
)
|
||||
{
|
||||
OpenAPI_trigger_request_t *trigger_request_local_var = ogs_malloc(sizeof(OpenAPI_trigger_request_t));
|
||||
ogs_assert(trigger_request_local_var);
|
||||
|
||||
trigger_request_local_var->supi = supi;
|
||||
trigger_request_local_var->failed_pcscf = failed_pcscf;
|
||||
|
||||
return trigger_request_local_var;
|
||||
}
|
||||
|
|
@ -27,6 +29,10 @@ void OpenAPI_trigger_request_free(OpenAPI_trigger_request_t *trigger_request)
|
|||
ogs_free(trigger_request->supi);
|
||||
trigger_request->supi = NULL;
|
||||
}
|
||||
if (trigger_request->failed_pcscf) {
|
||||
OpenAPI_pcscf_address_free(trigger_request->failed_pcscf);
|
||||
trigger_request->failed_pcscf = NULL;
|
||||
}
|
||||
ogs_free(trigger_request);
|
||||
}
|
||||
|
||||
|
|
@ -50,6 +56,19 @@ cJSON *OpenAPI_trigger_request_convertToJSON(OpenAPI_trigger_request_t *trigger_
|
|||
goto end;
|
||||
}
|
||||
|
||||
if (trigger_request->failed_pcscf) {
|
||||
cJSON *failed_pcscf_local_JSON = OpenAPI_pcscf_address_convertToJSON(trigger_request->failed_pcscf);
|
||||
if (failed_pcscf_local_JSON == NULL) {
|
||||
ogs_error("OpenAPI_trigger_request_convertToJSON() failed [failed_pcscf]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToObject(item, "failedPcscf", failed_pcscf_local_JSON);
|
||||
if (item->child == NULL) {
|
||||
ogs_error("OpenAPI_trigger_request_convertToJSON() failed [failed_pcscf]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
return item;
|
||||
}
|
||||
|
|
@ -59,6 +78,8 @@ OpenAPI_trigger_request_t *OpenAPI_trigger_request_parseFromJSON(cJSON *trigger_
|
|||
OpenAPI_trigger_request_t *trigger_request_local_var = NULL;
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
cJSON *supi = NULL;
|
||||
cJSON *failed_pcscf = NULL;
|
||||
OpenAPI_pcscf_address_t *failed_pcscf_local_nonprim = NULL;
|
||||
supi = cJSON_GetObjectItemCaseSensitive(trigger_requestJSON, "supi");
|
||||
if (!supi) {
|
||||
ogs_error("OpenAPI_trigger_request_parseFromJSON() failed [supi]");
|
||||
|
|
@ -69,12 +90,22 @@ OpenAPI_trigger_request_t *OpenAPI_trigger_request_parseFromJSON(cJSON *trigger_
|
|||
goto end;
|
||||
}
|
||||
|
||||
failed_pcscf = cJSON_GetObjectItemCaseSensitive(trigger_requestJSON, "failedPcscf");
|
||||
if (failed_pcscf) {
|
||||
failed_pcscf_local_nonprim = OpenAPI_pcscf_address_parseFromJSON(failed_pcscf);
|
||||
}
|
||||
|
||||
trigger_request_local_var = OpenAPI_trigger_request_create (
|
||||
ogs_strdup(supi->valuestring)
|
||||
ogs_strdup(supi->valuestring),
|
||||
failed_pcscf ? failed_pcscf_local_nonprim : NULL
|
||||
);
|
||||
|
||||
return trigger_request_local_var;
|
||||
end:
|
||||
if (failed_pcscf_local_nonprim) {
|
||||
OpenAPI_pcscf_address_free(failed_pcscf_local_nonprim);
|
||||
failed_pcscf_local_nonprim = NULL;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue