mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-05 15:24:14 +00:00
arch: DB schema Changes (#796)
- New function : NSSF - New feature : SMF selection
This commit is contained in:
parent
c6bfbed922
commit
9af4268bab
691 changed files with 40727 additions and 18985 deletions
|
|
@ -5,7 +5,12 @@
|
|||
#include "preferred_search.h"
|
||||
|
||||
OpenAPI_preferred_search_t *OpenAPI_preferred_search_create(
|
||||
int preferred_tai_match_ind
|
||||
int preferred_tai_match_ind,
|
||||
int preferred_full_plmn_match_ind,
|
||||
int preferred_api_versions_match_ind,
|
||||
int other_api_versions_ind,
|
||||
int preferred_locality_match_ind,
|
||||
int other_locality_ind
|
||||
)
|
||||
{
|
||||
OpenAPI_preferred_search_t *preferred_search_local_var = OpenAPI_malloc(sizeof(OpenAPI_preferred_search_t));
|
||||
|
|
@ -13,6 +18,11 @@ OpenAPI_preferred_search_t *OpenAPI_preferred_search_create(
|
|||
return NULL;
|
||||
}
|
||||
preferred_search_local_var->preferred_tai_match_ind = preferred_tai_match_ind;
|
||||
preferred_search_local_var->preferred_full_plmn_match_ind = preferred_full_plmn_match_ind;
|
||||
preferred_search_local_var->preferred_api_versions_match_ind = preferred_api_versions_match_ind;
|
||||
preferred_search_local_var->other_api_versions_ind = other_api_versions_ind;
|
||||
preferred_search_local_var->preferred_locality_match_ind = preferred_locality_match_ind;
|
||||
preferred_search_local_var->other_locality_ind = other_locality_ind;
|
||||
|
||||
return preferred_search_local_var;
|
||||
}
|
||||
|
|
@ -43,6 +53,41 @@ cJSON *OpenAPI_preferred_search_convertToJSON(OpenAPI_preferred_search_t *prefer
|
|||
}
|
||||
}
|
||||
|
||||
if (preferred_search->preferred_full_plmn_match_ind) {
|
||||
if (cJSON_AddBoolToObject(item, "preferredFullPlmnMatchInd", preferred_search->preferred_full_plmn_match_ind) == NULL) {
|
||||
ogs_error("OpenAPI_preferred_search_convertToJSON() failed [preferred_full_plmn_match_ind]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (preferred_search->preferred_api_versions_match_ind) {
|
||||
if (cJSON_AddBoolToObject(item, "preferredApiVersionsMatchInd", preferred_search->preferred_api_versions_match_ind) == NULL) {
|
||||
ogs_error("OpenAPI_preferred_search_convertToJSON() failed [preferred_api_versions_match_ind]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (preferred_search->other_api_versions_ind) {
|
||||
if (cJSON_AddBoolToObject(item, "otherApiVersionsInd", preferred_search->other_api_versions_ind) == NULL) {
|
||||
ogs_error("OpenAPI_preferred_search_convertToJSON() failed [other_api_versions_ind]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (preferred_search->preferred_locality_match_ind) {
|
||||
if (cJSON_AddBoolToObject(item, "preferredLocalityMatchInd", preferred_search->preferred_locality_match_ind) == NULL) {
|
||||
ogs_error("OpenAPI_preferred_search_convertToJSON() failed [preferred_locality_match_ind]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (preferred_search->other_locality_ind) {
|
||||
if (cJSON_AddBoolToObject(item, "otherLocalityInd", preferred_search->other_locality_ind) == NULL) {
|
||||
ogs_error("OpenAPI_preferred_search_convertToJSON() failed [other_locality_ind]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
return item;
|
||||
}
|
||||
|
|
@ -59,8 +104,58 @@ OpenAPI_preferred_search_t *OpenAPI_preferred_search_parseFromJSON(cJSON *prefer
|
|||
}
|
||||
}
|
||||
|
||||
cJSON *preferred_full_plmn_match_ind = cJSON_GetObjectItemCaseSensitive(preferred_searchJSON, "preferredFullPlmnMatchInd");
|
||||
|
||||
if (preferred_full_plmn_match_ind) {
|
||||
if (!cJSON_IsBool(preferred_full_plmn_match_ind)) {
|
||||
ogs_error("OpenAPI_preferred_search_parseFromJSON() failed [preferred_full_plmn_match_ind]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *preferred_api_versions_match_ind = cJSON_GetObjectItemCaseSensitive(preferred_searchJSON, "preferredApiVersionsMatchInd");
|
||||
|
||||
if (preferred_api_versions_match_ind) {
|
||||
if (!cJSON_IsBool(preferred_api_versions_match_ind)) {
|
||||
ogs_error("OpenAPI_preferred_search_parseFromJSON() failed [preferred_api_versions_match_ind]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *other_api_versions_ind = cJSON_GetObjectItemCaseSensitive(preferred_searchJSON, "otherApiVersionsInd");
|
||||
|
||||
if (other_api_versions_ind) {
|
||||
if (!cJSON_IsBool(other_api_versions_ind)) {
|
||||
ogs_error("OpenAPI_preferred_search_parseFromJSON() failed [other_api_versions_ind]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *preferred_locality_match_ind = cJSON_GetObjectItemCaseSensitive(preferred_searchJSON, "preferredLocalityMatchInd");
|
||||
|
||||
if (preferred_locality_match_ind) {
|
||||
if (!cJSON_IsBool(preferred_locality_match_ind)) {
|
||||
ogs_error("OpenAPI_preferred_search_parseFromJSON() failed [preferred_locality_match_ind]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cJSON *other_locality_ind = cJSON_GetObjectItemCaseSensitive(preferred_searchJSON, "otherLocalityInd");
|
||||
|
||||
if (other_locality_ind) {
|
||||
if (!cJSON_IsBool(other_locality_ind)) {
|
||||
ogs_error("OpenAPI_preferred_search_parseFromJSON() failed [other_locality_ind]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
preferred_search_local_var = OpenAPI_preferred_search_create (
|
||||
preferred_tai_match_ind ? preferred_tai_match_ind->valueint : 0
|
||||
preferred_tai_match_ind ? preferred_tai_match_ind->valueint : 0,
|
||||
preferred_full_plmn_match_ind ? preferred_full_plmn_match_ind->valueint : 0,
|
||||
preferred_api_versions_match_ind ? preferred_api_versions_match_ind->valueint : 0,
|
||||
other_api_versions_ind ? other_api_versions_ind->valueint : 0,
|
||||
preferred_locality_match_ind ? preferred_locality_match_ind->valueint : 0,
|
||||
other_locality_ind ? other_locality_ind->valueint : 0
|
||||
);
|
||||
|
||||
return preferred_search_local_var;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue