mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-04 22:30: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,7 +5,9 @@
|
|||
#include "acc_net_ch_id.h"
|
||||
|
||||
OpenAPI_acc_net_ch_id_t *OpenAPI_acc_net_ch_id_create(
|
||||
bool is_acc_net_cha_id_value,
|
||||
int acc_net_cha_id_value,
|
||||
char *acc_net_charg_id,
|
||||
OpenAPI_list_t *ref_pcc_rule_ids,
|
||||
bool is_session_ch_scope,
|
||||
int session_ch_scope
|
||||
|
|
@ -14,7 +16,9 @@ OpenAPI_acc_net_ch_id_t *OpenAPI_acc_net_ch_id_create(
|
|||
OpenAPI_acc_net_ch_id_t *acc_net_ch_id_local_var = ogs_malloc(sizeof(OpenAPI_acc_net_ch_id_t));
|
||||
ogs_assert(acc_net_ch_id_local_var);
|
||||
|
||||
acc_net_ch_id_local_var->is_acc_net_cha_id_value = is_acc_net_cha_id_value;
|
||||
acc_net_ch_id_local_var->acc_net_cha_id_value = acc_net_cha_id_value;
|
||||
acc_net_ch_id_local_var->acc_net_charg_id = acc_net_charg_id;
|
||||
acc_net_ch_id_local_var->ref_pcc_rule_ids = ref_pcc_rule_ids;
|
||||
acc_net_ch_id_local_var->is_session_ch_scope = is_session_ch_scope;
|
||||
acc_net_ch_id_local_var->session_ch_scope = session_ch_scope;
|
||||
|
|
@ -29,6 +33,10 @@ void OpenAPI_acc_net_ch_id_free(OpenAPI_acc_net_ch_id_t *acc_net_ch_id)
|
|||
if (NULL == acc_net_ch_id) {
|
||||
return;
|
||||
}
|
||||
if (acc_net_ch_id->acc_net_charg_id) {
|
||||
ogs_free(acc_net_ch_id->acc_net_charg_id);
|
||||
acc_net_ch_id->acc_net_charg_id = NULL;
|
||||
}
|
||||
if (acc_net_ch_id->ref_pcc_rule_ids) {
|
||||
OpenAPI_list_for_each(acc_net_ch_id->ref_pcc_rule_ids, node) {
|
||||
ogs_free(node->data);
|
||||
|
|
@ -50,10 +58,19 @@ cJSON *OpenAPI_acc_net_ch_id_convertToJSON(OpenAPI_acc_net_ch_id_t *acc_net_ch_i
|
|||
}
|
||||
|
||||
item = cJSON_CreateObject();
|
||||
if (acc_net_ch_id->is_acc_net_cha_id_value) {
|
||||
if (cJSON_AddNumberToObject(item, "accNetChaIdValue", acc_net_ch_id->acc_net_cha_id_value) == NULL) {
|
||||
ogs_error("OpenAPI_acc_net_ch_id_convertToJSON() failed [acc_net_cha_id_value]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (acc_net_ch_id->acc_net_charg_id) {
|
||||
if (cJSON_AddStringToObject(item, "accNetChargId", acc_net_ch_id->acc_net_charg_id) == NULL) {
|
||||
ogs_error("OpenAPI_acc_net_ch_id_convertToJSON() failed [acc_net_charg_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (acc_net_ch_id->ref_pcc_rule_ids) {
|
||||
cJSON *ref_pcc_rule_idsList = cJSON_AddArrayToObject(item, "refPccRuleIds");
|
||||
|
|
@ -85,18 +102,25 @@ OpenAPI_acc_net_ch_id_t *OpenAPI_acc_net_ch_id_parseFromJSON(cJSON *acc_net_ch_i
|
|||
OpenAPI_acc_net_ch_id_t *acc_net_ch_id_local_var = NULL;
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
cJSON *acc_net_cha_id_value = NULL;
|
||||
cJSON *acc_net_charg_id = NULL;
|
||||
cJSON *ref_pcc_rule_ids = NULL;
|
||||
OpenAPI_list_t *ref_pcc_rule_idsList = NULL;
|
||||
cJSON *session_ch_scope = NULL;
|
||||
acc_net_cha_id_value = cJSON_GetObjectItemCaseSensitive(acc_net_ch_idJSON, "accNetChaIdValue");
|
||||
if (!acc_net_cha_id_value) {
|
||||
ogs_error("OpenAPI_acc_net_ch_id_parseFromJSON() failed [acc_net_cha_id_value]");
|
||||
goto end;
|
||||
}
|
||||
if (acc_net_cha_id_value) {
|
||||
if (!cJSON_IsNumber(acc_net_cha_id_value)) {
|
||||
ogs_error("OpenAPI_acc_net_ch_id_parseFromJSON() failed [acc_net_cha_id_value]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
acc_net_charg_id = cJSON_GetObjectItemCaseSensitive(acc_net_ch_idJSON, "accNetChargId");
|
||||
if (acc_net_charg_id) {
|
||||
if (!cJSON_IsString(acc_net_charg_id) && !cJSON_IsNull(acc_net_charg_id)) {
|
||||
ogs_error("OpenAPI_acc_net_ch_id_parseFromJSON() failed [acc_net_charg_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
ref_pcc_rule_ids = cJSON_GetObjectItemCaseSensitive(acc_net_ch_idJSON, "refPccRuleIds");
|
||||
if (ref_pcc_rule_ids) {
|
||||
|
|
@ -128,8 +152,9 @@ OpenAPI_acc_net_ch_id_t *OpenAPI_acc_net_ch_id_parseFromJSON(cJSON *acc_net_ch_i
|
|||
}
|
||||
|
||||
acc_net_ch_id_local_var = OpenAPI_acc_net_ch_id_create (
|
||||
|
||||
acc_net_cha_id_value->valuedouble,
|
||||
acc_net_cha_id_value ? true : false,
|
||||
acc_net_cha_id_value ? acc_net_cha_id_value->valuedouble : 0,
|
||||
acc_net_charg_id && !cJSON_IsNull(acc_net_charg_id) ? ogs_strdup(acc_net_charg_id->valuestring) : NULL,
|
||||
ref_pcc_rule_ids ? ref_pcc_rule_idsList : NULL,
|
||||
session_ch_scope ? true : false,
|
||||
session_ch_scope ? session_ch_scope->valueint : 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue