mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-04 14:20:09 +00:00
[SBI] Crash occurs when ENUM in the MAP (#2103)
This commit is contained in:
parent
ce668c556c
commit
969c116e77
1097 changed files with 266728 additions and 42047 deletions
|
|
@ -32,16 +32,18 @@ OpenAPI_usage_threshold_rm_t *OpenAPI_usage_threshold_rm_create(
|
|||
|
||||
void OpenAPI_usage_threshold_rm_free(OpenAPI_usage_threshold_rm_t *usage_threshold_rm)
|
||||
{
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
|
||||
if (NULL == usage_threshold_rm) {
|
||||
return;
|
||||
}
|
||||
OpenAPI_lnode_t *node;
|
||||
ogs_free(usage_threshold_rm);
|
||||
}
|
||||
|
||||
cJSON *OpenAPI_usage_threshold_rm_convertToJSON(OpenAPI_usage_threshold_rm_t *usage_threshold_rm)
|
||||
{
|
||||
cJSON *item = NULL;
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
|
||||
if (usage_threshold_rm == NULL) {
|
||||
ogs_error("OpenAPI_usage_threshold_rm_convertToJSON() failed [UsageThresholdRm]");
|
||||
|
|
@ -84,8 +86,12 @@ end:
|
|||
OpenAPI_usage_threshold_rm_t *OpenAPI_usage_threshold_rm_parseFromJSON(cJSON *usage_threshold_rmJSON)
|
||||
{
|
||||
OpenAPI_usage_threshold_rm_t *usage_threshold_rm_local_var = NULL;
|
||||
cJSON *duration = cJSON_GetObjectItemCaseSensitive(usage_threshold_rmJSON, "duration");
|
||||
|
||||
OpenAPI_lnode_t *node = NULL;
|
||||
cJSON *duration = NULL;
|
||||
cJSON *total_volume = NULL;
|
||||
cJSON *downlink_volume = NULL;
|
||||
cJSON *uplink_volume = NULL;
|
||||
duration = cJSON_GetObjectItemCaseSensitive(usage_threshold_rmJSON, "duration");
|
||||
if (duration) {
|
||||
if (!cJSON_IsNumber(duration)) {
|
||||
ogs_error("OpenAPI_usage_threshold_rm_parseFromJSON() failed [duration]");
|
||||
|
|
@ -93,8 +99,7 @@ OpenAPI_usage_threshold_rm_t *OpenAPI_usage_threshold_rm_parseFromJSON(cJSON *us
|
|||
}
|
||||
}
|
||||
|
||||
cJSON *total_volume = cJSON_GetObjectItemCaseSensitive(usage_threshold_rmJSON, "totalVolume");
|
||||
|
||||
total_volume = cJSON_GetObjectItemCaseSensitive(usage_threshold_rmJSON, "totalVolume");
|
||||
if (total_volume) {
|
||||
if (!cJSON_IsNumber(total_volume)) {
|
||||
ogs_error("OpenAPI_usage_threshold_rm_parseFromJSON() failed [total_volume]");
|
||||
|
|
@ -102,8 +107,7 @@ OpenAPI_usage_threshold_rm_t *OpenAPI_usage_threshold_rm_parseFromJSON(cJSON *us
|
|||
}
|
||||
}
|
||||
|
||||
cJSON *downlink_volume = cJSON_GetObjectItemCaseSensitive(usage_threshold_rmJSON, "downlinkVolume");
|
||||
|
||||
downlink_volume = cJSON_GetObjectItemCaseSensitive(usage_threshold_rmJSON, "downlinkVolume");
|
||||
if (downlink_volume) {
|
||||
if (!cJSON_IsNumber(downlink_volume)) {
|
||||
ogs_error("OpenAPI_usage_threshold_rm_parseFromJSON() failed [downlink_volume]");
|
||||
|
|
@ -111,8 +115,7 @@ OpenAPI_usage_threshold_rm_t *OpenAPI_usage_threshold_rm_parseFromJSON(cJSON *us
|
|||
}
|
||||
}
|
||||
|
||||
cJSON *uplink_volume = cJSON_GetObjectItemCaseSensitive(usage_threshold_rmJSON, "uplinkVolume");
|
||||
|
||||
uplink_volume = cJSON_GetObjectItemCaseSensitive(usage_threshold_rmJSON, "uplinkVolume");
|
||||
if (uplink_volume) {
|
||||
if (!cJSON_IsNumber(uplink_volume)) {
|
||||
ogs_error("OpenAPI_usage_threshold_rm_parseFromJSON() failed [uplink_volume]");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue