mirror of
https://github.com/open5gs/open5gs.git
synced 2025-11-22 15:31:16 +00:00
arch: DB schema Changes (#796)
- New function : NSSF - New feature : SMF selection
This commit is contained in:
@@ -6,10 +6,12 @@
|
||||
|
||||
OpenAPI_hss_authentication_info_request_t *OpenAPI_hss_authentication_info_request_create(
|
||||
char *supported_features,
|
||||
OpenAPI_hss_auth_type_t *hss_auth_type,
|
||||
OpenAPI_hss_auth_type_e hss_auth_type,
|
||||
int num_of_requested_vectors,
|
||||
OpenAPI_node_type_e requesting_node_type,
|
||||
OpenAPI_plmn_id_t *serving_network_id,
|
||||
OpenAPI_resynchronization_info_t *resynchronization_info
|
||||
OpenAPI_resynchronization_info_t *resynchronization_info,
|
||||
OpenAPI_access_network_id_e an_id
|
||||
)
|
||||
{
|
||||
OpenAPI_hss_authentication_info_request_t *hss_authentication_info_request_local_var = OpenAPI_malloc(sizeof(OpenAPI_hss_authentication_info_request_t));
|
||||
@@ -19,8 +21,10 @@ OpenAPI_hss_authentication_info_request_t *OpenAPI_hss_authentication_info_reque
|
||||
hss_authentication_info_request_local_var->supported_features = supported_features;
|
||||
hss_authentication_info_request_local_var->hss_auth_type = hss_auth_type;
|
||||
hss_authentication_info_request_local_var->num_of_requested_vectors = num_of_requested_vectors;
|
||||
hss_authentication_info_request_local_var->requesting_node_type = requesting_node_type;
|
||||
hss_authentication_info_request_local_var->serving_network_id = serving_network_id;
|
||||
hss_authentication_info_request_local_var->resynchronization_info = resynchronization_info;
|
||||
hss_authentication_info_request_local_var->an_id = an_id;
|
||||
|
||||
return hss_authentication_info_request_local_var;
|
||||
}
|
||||
@@ -32,7 +36,6 @@ void OpenAPI_hss_authentication_info_request_free(OpenAPI_hss_authentication_inf
|
||||
}
|
||||
OpenAPI_lnode_t *node;
|
||||
ogs_free(hss_authentication_info_request->supported_features);
|
||||
OpenAPI_hss_auth_type_free(hss_authentication_info_request->hss_auth_type);
|
||||
OpenAPI_plmn_id_free(hss_authentication_info_request->serving_network_id);
|
||||
OpenAPI_resynchronization_info_free(hss_authentication_info_request->resynchronization_info);
|
||||
ogs_free(hss_authentication_info_request);
|
||||
@@ -59,13 +62,7 @@ cJSON *OpenAPI_hss_authentication_info_request_convertToJSON(OpenAPI_hss_authent
|
||||
ogs_error("OpenAPI_hss_authentication_info_request_convertToJSON() failed [hss_auth_type]");
|
||||
goto end;
|
||||
}
|
||||
cJSON *hss_auth_type_local_JSON = OpenAPI_hss_auth_type_convertToJSON(hss_authentication_info_request->hss_auth_type);
|
||||
if (hss_auth_type_local_JSON == NULL) {
|
||||
ogs_error("OpenAPI_hss_authentication_info_request_convertToJSON() failed [hss_auth_type]");
|
||||
goto end;
|
||||
}
|
||||
cJSON_AddItemToObject(item, "hssAuthType", hss_auth_type_local_JSON);
|
||||
if (item->child == NULL) {
|
||||
if (cJSON_AddStringToObject(item, "hssAuthType", OpenAPI_hss_auth_type_ToString(hss_authentication_info_request->hss_auth_type)) == NULL) {
|
||||
ogs_error("OpenAPI_hss_authentication_info_request_convertToJSON() failed [hss_auth_type]");
|
||||
goto end;
|
||||
}
|
||||
@@ -79,6 +76,13 @@ cJSON *OpenAPI_hss_authentication_info_request_convertToJSON(OpenAPI_hss_authent
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (hss_authentication_info_request->requesting_node_type) {
|
||||
if (cJSON_AddStringToObject(item, "requestingNodeType", OpenAPI_node_type_ToString(hss_authentication_info_request->requesting_node_type)) == NULL) {
|
||||
ogs_error("OpenAPI_hss_authentication_info_request_convertToJSON() failed [requesting_node_type]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (hss_authentication_info_request->serving_network_id) {
|
||||
cJSON *serving_network_id_local_JSON = OpenAPI_plmn_id_convertToJSON(hss_authentication_info_request->serving_network_id);
|
||||
if (serving_network_id_local_JSON == NULL) {
|
||||
@@ -105,6 +109,13 @@ cJSON *OpenAPI_hss_authentication_info_request_convertToJSON(OpenAPI_hss_authent
|
||||
}
|
||||
}
|
||||
|
||||
if (hss_authentication_info_request->an_id) {
|
||||
if (cJSON_AddStringToObject(item, "anId", OpenAPI_access_network_id_ToString(hss_authentication_info_request->an_id)) == NULL) {
|
||||
ogs_error("OpenAPI_hss_authentication_info_request_convertToJSON() failed [an_id]");
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
end:
|
||||
return item;
|
||||
}
|
||||
@@ -127,9 +138,13 @@ OpenAPI_hss_authentication_info_request_t *OpenAPI_hss_authentication_info_reque
|
||||
goto end;
|
||||
}
|
||||
|
||||
OpenAPI_hss_auth_type_t *hss_auth_type_local_nonprim = NULL;
|
||||
OpenAPI_hss_auth_type_e hss_auth_typeVariable;
|
||||
|
||||
hss_auth_type_local_nonprim = OpenAPI_hss_auth_type_parseFromJSON(hss_auth_type);
|
||||
if (!cJSON_IsString(hss_auth_type)) {
|
||||
ogs_error("OpenAPI_hss_authentication_info_request_parseFromJSON() failed [hss_auth_type]");
|
||||
goto end;
|
||||
}
|
||||
hss_auth_typeVariable = OpenAPI_hss_auth_type_FromString(hss_auth_type->valuestring);
|
||||
|
||||
cJSON *num_of_requested_vectors = cJSON_GetObjectItemCaseSensitive(hss_authentication_info_requestJSON, "numOfRequestedVectors");
|
||||
if (!num_of_requested_vectors) {
|
||||
@@ -143,6 +158,17 @@ OpenAPI_hss_authentication_info_request_t *OpenAPI_hss_authentication_info_reque
|
||||
goto end;
|
||||
}
|
||||
|
||||
cJSON *requesting_node_type = cJSON_GetObjectItemCaseSensitive(hss_authentication_info_requestJSON, "requestingNodeType");
|
||||
|
||||
OpenAPI_node_type_e requesting_node_typeVariable;
|
||||
if (requesting_node_type) {
|
||||
if (!cJSON_IsString(requesting_node_type)) {
|
||||
ogs_error("OpenAPI_hss_authentication_info_request_parseFromJSON() failed [requesting_node_type]");
|
||||
goto end;
|
||||
}
|
||||
requesting_node_typeVariable = OpenAPI_node_type_FromString(requesting_node_type->valuestring);
|
||||
}
|
||||
|
||||
cJSON *serving_network_id = cJSON_GetObjectItemCaseSensitive(hss_authentication_info_requestJSON, "servingNetworkId");
|
||||
|
||||
OpenAPI_plmn_id_t *serving_network_id_local_nonprim = NULL;
|
||||
@@ -157,12 +183,25 @@ OpenAPI_hss_authentication_info_request_t *OpenAPI_hss_authentication_info_reque
|
||||
resynchronization_info_local_nonprim = OpenAPI_resynchronization_info_parseFromJSON(resynchronization_info);
|
||||
}
|
||||
|
||||
cJSON *an_id = cJSON_GetObjectItemCaseSensitive(hss_authentication_info_requestJSON, "anId");
|
||||
|
||||
OpenAPI_access_network_id_e an_idVariable;
|
||||
if (an_id) {
|
||||
if (!cJSON_IsString(an_id)) {
|
||||
ogs_error("OpenAPI_hss_authentication_info_request_parseFromJSON() failed [an_id]");
|
||||
goto end;
|
||||
}
|
||||
an_idVariable = OpenAPI_access_network_id_FromString(an_id->valuestring);
|
||||
}
|
||||
|
||||
hss_authentication_info_request_local_var = OpenAPI_hss_authentication_info_request_create (
|
||||
supported_features ? ogs_strdup(supported_features->valuestring) : NULL,
|
||||
hss_auth_type_local_nonprim,
|
||||
hss_auth_typeVariable,
|
||||
num_of_requested_vectors->valuedouble,
|
||||
requesting_node_type ? requesting_node_typeVariable : 0,
|
||||
serving_network_id ? serving_network_id_local_nonprim : NULL,
|
||||
resynchronization_info ? resynchronization_info_local_nonprim : NULL
|
||||
resynchronization_info ? resynchronization_info_local_nonprim : NULL,
|
||||
an_id ? an_idVariable : 0
|
||||
);
|
||||
|
||||
return hss_authentication_info_request_local_var;
|
||||
|
||||
Reference in New Issue
Block a user