Re-enabling HTTP/1.1 (#1570)

This commit is contained in:
Sukchan Lee 2022-06-06 22:20:52 +09:00
parent 828fa23d16
commit 18cca7f5e4
3 changed files with 38 additions and 7 deletions

View File

@ -289,6 +289,11 @@ static void server_stop(ogs_sbi_server_t *server)
}
}
static void free_callback(void *cls)
{
ogs_free(cls);
}
static bool server_send_response(
ogs_sbi_stream_t *stream, ogs_sbi_response_t *response)
{
@ -325,10 +330,20 @@ static bool server_send_response(
ogs_assert(mhd_socket != INVALID_SOCKET);
if (response->http.content) {
mhd_response = MHD_create_response_from_buffer(
mhd_response = MHD_create_response_from_buffer_with_free_callback(
response->http.content_length, response->http.content,
MHD_RESPMEM_PERSISTENT);
free_callback);
ogs_assert(mhd_response);
/* response->http.content will be freed in free_callback() function.
*
* ogs_sbi_response_free(response) should not de-allocate
* response->http.content memory.
*
* So, we'll set response->http.content to NULL.
*/
response->http.content = NULL;
} else {
mhd_response = MHD_create_response_from_buffer(
0, NULL, MHD_RESPMEM_PERSISTENT);

View File

@ -1120,12 +1120,18 @@ int gmm_handle_ul_nas_transport(amf_ue_t *amf_ue,
OGS_NAS_5GS_PDU_SESSION_RELEASE_COMPLETE) {
param.ue_location = true;
param.ue_timezone = true;
}
ogs_assert(true ==
amf_sess_sbi_discover_and_send(OpenAPI_nf_type_SMF,
sess, AMF_UPDATE_SM_CONTEXT_N1_RELEASED, &param,
amf_nsmf_pdusession_build_update_sm_context));
ogs_assert(true ==
amf_sess_sbi_discover_and_send(OpenAPI_nf_type_SMF,
sess, AMF_UPDATE_SM_CONTEXT_N1_RELEASED, &param,
amf_nsmf_pdusession_build_update_sm_context));
} else {
ogs_assert(true ==
amf_sess_sbi_discover_and_send(OpenAPI_nf_type_SMF,
sess, AMF_UPDATE_SM_CONTEXT_MODIFIED, &param,
amf_nsmf_pdusession_build_update_sm_context));
}
switch (gsm_header->message_type) {
case OGS_NAS_5GS_PDU_SESSION_MODIFICATION_COMPLETE:

View File

@ -487,6 +487,16 @@ int amf_nsmf_pdusession_handle_update_sm_context(
* 4. PFCP Session Modifcation Response
*/
/*
* 1. PDU session release request
* 2. /nsmf-pdusession/v1/sm-contexts/{smContextRef}/modify
*/
/*
* 1. PDU session modification complete
* 2. /nsmf-pdusession/v1/sm-contexts/{smContextRef}/modify
*/
} else if (state == AMF_UPDATE_SM_CONTEXT_DEACTIVATED) {
/*
* 1. UEContextReleaseRequest