Compare commits

..

No commits in common. "eb2b19b39ca5e64fb3875207f2e6f0c5a81753b9" and "da5d424ed92405f3adb2a1fd73c65414b5803ee7" have entirely different histories.

53 changed files with 395 additions and 603 deletions

View File

@ -773,23 +773,21 @@ void ogs_pfcp_build_update_urr(
/* No change requested, skip. */
if (!(modify_flags & (OGS_PFCP_MODIFY_URR_MEAS_METHOD|
OGS_PFCP_MODIFY_URR_REPORT_TRIGGER|
OGS_PFCP_MODIFY_URR_VOLUME_THRESH|
OGS_PFCP_MODIFY_URR_QUOTA_VALIDITY_TIME|
OGS_PFCP_MODIFY_URR_VOLUME_QUOTA|
OGS_PFCP_MODIFY_URR_TIME_THRESH|
OGS_PFCP_MODIFY_URR_VOLUME_THRESH|
OGS_PFCP_MODIFY_URR_TIME_QUOTA|
OGS_PFCP_MODIFY_URR_QUOTA_VALIDITY_TIME)))
OGS_PFCP_MODIFY_URR_TIME_THRESH)))
return;
/* Change request: Send only changed IEs */
message->presence = 1;
message->urr_id.presence = 1;
message->urr_id.u32 = urr->id;
if (modify_flags & OGS_PFCP_MODIFY_URR_MEAS_METHOD) {
message->measurement_method.presence = 1;
message->measurement_method.u8 = urr->meas_method;
}
if (modify_flags & OGS_PFCP_MODIFY_URR_REPORT_TRIGGER) {
message->reporting_triggers.presence = 1;
message->reporting_triggers.u24 = (urr->rep_triggers.reptri_5 << 16)
@ -806,35 +804,12 @@ void ogs_pfcp_build_update_urr(
}
}
if (modify_flags & OGS_PFCP_MODIFY_URR_VOLUME_QUOTA) {
if (urr->vol_quota.flags) {
message->volume_quota.presence = 1;
ogs_pfcp_build_volume(
&message->volume_quota, &urr->vol_quota,
&urrbuf[i].vol_quota, sizeof(urrbuf[i].vol_quota));
}
}
if (modify_flags & OGS_PFCP_MODIFY_URR_TIME_THRESH) {
if (urr->time_threshold) {
message->time_threshold.presence = 1;
message->time_threshold.u32 = urr->time_threshold;
}
}
if (modify_flags & OGS_PFCP_MODIFY_URR_TIME_QUOTA) {
if (urr->time_quota) {
message->time_quota.presence = 1;
message->time_quota.u32 = urr->time_quota;
}
}
if (modify_flags & OGS_PFCP_MODIFY_URR_QUOTA_VALIDITY_TIME) {
if (urr->quota_validity_time) {
message->quota_validity_time.presence = 1;
message->quota_validity_time.u32 = urr->quota_validity_time;
}
}
}
static struct {

View File

@ -48,7 +48,7 @@ extern "C" {
#define OGS_SBI_HTTP_STATUS_UNAUTHORIZED 401 /* ALL */
#define OGS_SBI_HTTP_STATUS_FORBIDDEN 403 /* ALL */
#define OGS_SBI_HTTP_STATUS_NOT_FOUND 404 /* ALL */
#define OGS_SBI_HTTP_STATUS_METHOD_NOT_ALLOWED 405 /* ALL */
#define OGS_SBI_HTTP_STATUS_MEHTOD_NOT_ALLOWED 405 /* ALL */
#define OGS_SBI_HTTP_STATUS_NOT_ACCEPTABLE 406 /* GET OPTIONS */
#define OGS_SBI_HTTP_STATUS_REQUEST_TIMEOUT 408 /* ALL */
#define OGS_SBI_HTTP_STATUS_CONFLICT 409 /* PATCH POST PUT */

View File

@ -576,7 +576,7 @@ suspend:
ogs_assert(true ==
ogs_sbi_server_send_error((ogs_sbi_stream_t *)sbi_sess,
OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR, NULL,
"server callback error", NULL, NULL));
"server callback error", NULL));
return MHD_YES;
}

View File

@ -1174,7 +1174,7 @@ static int on_frame_recv(nghttp2_session *session,
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR, NULL,
"server callback error", NULL, NULL));
"server callback error", NULL));
return 0;
}

View File

@ -927,7 +927,7 @@ bool ogs_nnrf_nfm_handle_nf_status_notify(
ogs_error("No NotificationData");
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No NotificationData", NULL, NULL));
recvmsg, "No NotificationData", NULL));
return false;
}
@ -935,7 +935,7 @@ bool ogs_nnrf_nfm_handle_nf_status_notify(
ogs_error("No nfInstanceUri");
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No nfInstanceUri", NULL, NULL));
recvmsg, "No nfInstanceUri", NULL));
return false;
}
@ -947,7 +947,7 @@ bool ogs_nnrf_nfm_handle_nf_status_notify(
ogs_error("Cannot parse nfInstanceUri [%s]", header.uri);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "Cannot parse nfInstanceUri", header.uri, NULL));
recvmsg, "Cannot parse nfInstanceUri", header.uri));
return false;
}
@ -955,7 +955,7 @@ bool ogs_nnrf_nfm_handle_nf_status_notify(
ogs_error("No nfInstanceId [%s]", header.uri);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "Cannot parse nfInstanceUri", header.uri, NULL));
recvmsg, "Cannot parse nfInstanceUri", header.uri));
ogs_sbi_header_free(&header);
return false;
}
@ -966,7 +966,7 @@ bool ogs_nnrf_nfm_handle_nf_status_notify(
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_FORBIDDEN,
recvmsg, "The notification is not allowed",
message.h.resource.component[1], NULL));
message.h.resource.component[1]));
ogs_sbi_header_free(&header);
return false;
}
@ -982,7 +982,7 @@ bool ogs_nnrf_nfm_handle_nf_status_notify(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No NFProfile", NULL, NULL));
recvmsg, "No NFProfile", NULL));
ogs_sbi_header_free(&header);
return false;
}
@ -992,7 +992,7 @@ bool ogs_nnrf_nfm_handle_nf_status_notify(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No NFProfile.NFInstanceId", NULL, NULL));
recvmsg, "No NFProfile.NFInstanceId", NULL));
ogs_sbi_header_free(&header);
return false;
}
@ -1002,7 +1002,7 @@ bool ogs_nnrf_nfm_handle_nf_status_notify(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No NFProfile.NFType", NULL, NULL));
recvmsg, "No NFProfile.NFType", NULL));
ogs_sbi_header_free(&header);
return false;
}
@ -1012,7 +1012,7 @@ bool ogs_nnrf_nfm_handle_nf_status_notify(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No NFProfile.NFStatus", NULL, NULL));
recvmsg, "No NFProfile.NFStatus", NULL));
ogs_sbi_header_free(&header);
return false;
}
@ -1086,8 +1086,7 @@ bool ogs_nnrf_nfm_handle_nf_status_notify(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_NOT_FOUND,
recvmsg, "Not found", message.h.resource.component[1],
NULL));
recvmsg, "Not found", message.h.resource.component[1]));
ogs_sbi_header_free(&header);
return false;
}
@ -1099,7 +1098,7 @@ bool ogs_nnrf_nfm_handle_nf_status_notify(
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "Not supported event",
eventstr ? eventstr : "Unknown", NULL));
eventstr ? eventstr : "Unknown"));
ogs_sbi_header_free(&header);
return false;
}

View File

@ -197,7 +197,7 @@ bool ogs_sbi_server_send_problem(
bool ogs_sbi_server_send_error(ogs_sbi_stream_t *stream,
int status, ogs_sbi_message_t *message,
const char *title, const char *detail, const char *cause)
const char *title, const char *detail)
{
OpenAPI_problem_details_t problem;
@ -224,7 +224,6 @@ bool ogs_sbi_server_send_error(ogs_sbi_stream_t *stream,
}
problem.title = (char*)title;
problem.detail = (char*)detail;
problem.cause = (char*)cause;
ogs_sbi_server_send_problem(stream, &problem);

View File

@ -90,8 +90,7 @@ bool ogs_sbi_server_send_response(
ogs_sbi_stream_t *stream, ogs_sbi_response_t *response);
bool ogs_sbi_server_send_error(ogs_sbi_stream_t *stream,
int status, ogs_sbi_message_t *message,
const char *title, const char *detail, const char *cause);
const char *title, const char *detail);
bool ogs_sbi_server_send_problem(
ogs_sbi_stream_t *stream, OpenAPI_problem_details_t *problem);

View File

@ -99,7 +99,7 @@ void amf_state_operational(ogs_fsm_t *s, amf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
NULL, "cannot parse HTTP sbi_message", NULL, NULL));
NULL, "cannot parse HTTP sbi_message", NULL));
break;
}
@ -117,7 +117,7 @@ void amf_state_operational(ogs_fsm_t *s, amf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
&sbi_message, "Not supported version", NULL, NULL));
&sbi_message, "Not supported version", NULL));
ogs_sbi_message_free(&sbi_message);
break;
}
@ -137,7 +137,7 @@ void amf_state_operational(ogs_fsm_t *s, amf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN, &sbi_message,
"Invalid HTTP method", sbi_message.h.method, NULL));
"Invalid HTTP method", sbi_message.h.method));
END
break;
@ -148,7 +148,7 @@ void amf_state_operational(ogs_fsm_t *s, amf_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &sbi_message,
"Invalid resource name",
sbi_message.h.resource.component[0], NULL));
sbi_message.h.resource.component[0]));
END
break;
@ -166,7 +166,7 @@ void amf_state_operational(ogs_fsm_t *s, amf_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
&sbi_message,
"No N1N2MessageTransferReqData", NULL, NULL));
"No N1N2MessageTransferReqData", NULL));
}
break;
@ -176,8 +176,7 @@ void amf_state_operational(ogs_fsm_t *s, amf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN, &sbi_message,
"Invalid HTTP method", sbi_message.h.method,
NULL));
"Invalid HTTP method", sbi_message.h.method));
END
break;
@ -193,8 +192,7 @@ void amf_state_operational(ogs_fsm_t *s, amf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN, &sbi_message,
"Invalid HTTP method", sbi_message.h.method,
NULL));
"Invalid HTTP method", sbi_message.h.method));
END
break;
@ -205,7 +203,7 @@ void amf_state_operational(ogs_fsm_t *s, amf_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &sbi_message,
"Invalid resource name",
sbi_message.h.resource.component[2], NULL));
sbi_message.h.resource.component[2]));
END
break;
@ -216,7 +214,7 @@ void amf_state_operational(ogs_fsm_t *s, amf_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &sbi_message,
"Invalid resource name",
sbi_message.h.resource.component[0], NULL));
sbi_message.h.resource.component[0]));
END
break;
@ -247,7 +245,7 @@ void amf_state_operational(ogs_fsm_t *s, amf_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &sbi_message,
"Invalid resource name",
sbi_message.h.resource.component[1], NULL));
sbi_message.h.resource.component[1]));
END
break;
@ -256,8 +254,7 @@ void amf_state_operational(ogs_fsm_t *s, amf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &sbi_message,
"Invalid API name", sbi_message.h.resource.component[0],
NULL));
"Invalid API name", sbi_message.h.resource.component[0]));
END
/* In lib/sbi/server.c, notify_completed() releases 'request' buffer. */

View File

@ -1467,7 +1467,7 @@ cleanup:
ogs_error("%s", strerror);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, status, NULL, strerror, NULL, NULL));
ogs_sbi_server_send_error(stream, status, NULL, strerror, NULL));
ogs_free(strerror);
return OGS_ERROR;

View File

@ -73,7 +73,7 @@ void ausf_state_operational(ogs_fsm_t *s, ausf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
NULL, "cannot parse HTTP message", NULL, NULL));
NULL, "cannot parse HTTP message", NULL));
break;
}
@ -82,7 +82,7 @@ void ausf_state_operational(ogs_fsm_t *s, ausf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
&message, "Not supported version", NULL, NULL));
&message, "Not supported version", NULL));
ogs_sbi_message_free(&message);
break;
}
@ -104,8 +104,7 @@ void ausf_state_operational(ogs_fsm_t *s, ausf_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN,
&message,
"Invalid HTTP method", message.h.method,
NULL));
"Invalid HTTP method", message.h.method));
END
break;
@ -116,7 +115,7 @@ void ausf_state_operational(ogs_fsm_t *s, ausf_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Unknown resource name",
message.h.resource.component[0], NULL));
message.h.resource.component[0]));
END
break;
@ -148,7 +147,7 @@ void ausf_state_operational(ogs_fsm_t *s, ausf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_NOT_FOUND,
&message, "Not found", message.h.method, NULL));
&message, "Not found", message.h.method));
break;
}
@ -168,8 +167,7 @@ void ausf_state_operational(ogs_fsm_t *s, ausf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Invalid API name", message.h.resource.component[0],
NULL));
"Invalid API name", message.h.resource.component[0]));
END
/* In lib/sbi/server.c, notify_completed() releases 'request' buffer. */
@ -430,7 +428,7 @@ void ausf_state_operational(ogs_fsm_t *s, ausf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT, NULL,
"Cannot receive SBI message", NULL, NULL));
"Cannot receive SBI message", NULL));
break;
default:
ogs_error("Unknown timer[%s:%d]",

View File

@ -37,7 +37,7 @@ bool ausf_nausf_auth_handle_authenticate(ausf_ue_t *ausf_ue,
ogs_error("[%s] No AuthenticationInfo", ausf_ue->suci);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No AuthenticationInfo", ausf_ue->suci, NULL));
recvmsg, "No AuthenticationInfo", ausf_ue->suci));
return false;
}
@ -46,7 +46,7 @@ bool ausf_nausf_auth_handle_authenticate(ausf_ue_t *ausf_ue,
ogs_error("[%s] No servingNetworkName", ausf_ue->suci);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No servingNetworkName", ausf_ue->suci, NULL));
recvmsg, "No servingNetworkName", ausf_ue->suci));
return false;
}
@ -82,7 +82,7 @@ bool ausf_nausf_auth_handle_authenticate_confirmation(ausf_ue_t *ausf_ue,
ogs_error("[%s] No ConfirmationData", ausf_ue->suci);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No ConfirmationData", ausf_ue->suci, NULL));
recvmsg, "No ConfirmationData", ausf_ue->suci));
return false;
}
@ -91,7 +91,7 @@ bool ausf_nausf_auth_handle_authenticate_confirmation(ausf_ue_t *ausf_ue,
ogs_error("[%s] No ConfirmationData.resStar", ausf_ue->suci);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No ConfirmationData.resStar", ausf_ue->suci, NULL));
recvmsg, "No ConfirmationData.resStar", ausf_ue->suci));
return false;
}

View File

@ -63,8 +63,7 @@ bool ausf_nudm_ueau_handle_get(ausf_ue_t *ausf_ue,
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No AuthenticationInfoResult", ausf_ue->suci,
NULL));
recvmsg, "No AuthenticationInfoResult", ausf_ue->suci));
return false;
}
@ -76,8 +75,7 @@ bool ausf_nudm_ueau_handle_get(ausf_ue_t *ausf_ue,
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_NOT_IMPLEMENTED,
recvmsg, "Not supported Auth Method", ausf_ue->suci,
NULL));
recvmsg, "Not supported Auth Method", ausf_ue->suci));
return false;
}
@ -88,32 +86,17 @@ bool ausf_nudm_ueau_handle_get(ausf_ue_t *ausf_ue,
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No AuthenticationVector", ausf_ue->suci, NULL));
recvmsg, "No AuthenticationVector", ausf_ue->suci));
return false;
}
if (AuthenticationVector->av_type != OpenAPI_av_type_5G_HE_AKA) {
ogs_error("[%s] Not supported Auth Method [%d]",
ausf_ue->suci, AuthenticationVector->av_type);
/*
* TS29.509
* 5.2.2.2.2 5G AKA
*
* On failure or redirection, one of the HTTP status code
* listed in table 6.1.7.3-1 shall be returned with the message
* body containing a ProblemDetails structure with the "cause"
* attribute set to one of the application error listed in
* Table 6.1.7.3-1.
* Application Error: AUTHENTICATION_REJECTED
* HTTP status code: 403 Forbidden
* Description: The user cannot be authenticated with this
* authentication method e.g. only SIM data available
*/
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN,
recvmsg, "Not supported Auth Method", ausf_ue->suci,
"AUTHENTICATION_REJECTED"));
recvmsg, "Not supported Auth Method", ausf_ue->suci));
return false;
}
@ -122,8 +105,7 @@ bool ausf_nudm_ueau_handle_get(ausf_ue_t *ausf_ue,
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No AuthenticationVector.rand", ausf_ue->suci,
NULL));
recvmsg, "No AuthenticationVector.rand", ausf_ue->suci));
return false;
}
@ -133,8 +115,7 @@ bool ausf_nudm_ueau_handle_get(ausf_ue_t *ausf_ue,
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No AuthenticationVector.xresStar", ausf_ue->suci,
NULL));
recvmsg, "No AuthenticationVector.xresStar", ausf_ue->suci));
return false;
}
@ -143,8 +124,7 @@ bool ausf_nudm_ueau_handle_get(ausf_ue_t *ausf_ue,
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No AuthenticationVector.autn", ausf_ue->suci,
NULL));
recvmsg, "No AuthenticationVector.autn", ausf_ue->suci));
return false;
}
@ -153,8 +133,7 @@ bool ausf_nudm_ueau_handle_get(ausf_ue_t *ausf_ue,
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No AuthenticationVector.kausf", ausf_ue->suci,
NULL));
recvmsg, "No AuthenticationVector.kausf", ausf_ue->suci));
return false;
}
@ -163,8 +142,7 @@ bool ausf_nudm_ueau_handle_get(ausf_ue_t *ausf_ue,
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No AuthenticationVector.supi", ausf_ue->suci,
NULL));
recvmsg, "No AuthenticationVector.supi", ausf_ue->suci));
return false;
}
@ -296,7 +274,7 @@ bool ausf_nudm_ueau_handle_result_confirmation_inform(ausf_ue_t *ausf_ue,
ogs_error("[%s] No AuthEvent", ausf_ue->suci);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No AuthEvent", ausf_ue->suci, NULL));
recvmsg, "No AuthEvent", ausf_ue->suci));
return false;
}
@ -304,7 +282,7 @@ bool ausf_nudm_ueau_handle_result_confirmation_inform(ausf_ue_t *ausf_ue,
ogs_error("[%s] No Location", ausf_ue->suci);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No Location", ausf_ue->suci, NULL));
recvmsg, "No Location", ausf_ue->suci));
return false;
}

View File

@ -96,7 +96,7 @@ int ausf_sbi_discover_and_send(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT, NULL,
"Cannot discover", ausf_ue->suci, NULL));
"Cannot discover", ausf_ue->suci));
return OGS_ERROR;
}
@ -109,7 +109,7 @@ int ausf_sbi_discover_and_send(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT, NULL,
"Cannot discover", ausf_ue->suci, NULL));
"Cannot discover", ausf_ue->suci));
return r;
}

View File

@ -95,7 +95,7 @@ void ausf_ue_state_operational(ogs_fsm_t *s, ausf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "[%s] No SUPI", ausf_ue->suci, NULL));
message, "[%s] No SUPI", ausf_ue->suci));
OGS_FSM_TRAN(s, ausf_ue_state_exception);
break;
}
@ -114,7 +114,7 @@ void ausf_ue_state_operational(ogs_fsm_t *s, ausf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "[%s] No SUPI", ausf_ue->suci, NULL));
message, "[%s] No SUPI", ausf_ue->suci));
OGS_FSM_TRAN(s, ausf_ue_state_exception);
break;
}
@ -133,8 +133,7 @@ void ausf_ue_state_operational(ogs_fsm_t *s, ausf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN, message,
"Invalid HTTP method", message->h.method,
NULL));
"Invalid HTTP method", message->h.method));
END
break;
@ -163,8 +162,7 @@ void ausf_ue_state_operational(ogs_fsm_t *s, ausf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, message->res_status,
NULL, "HTTP response error", ausf_ue->suci,
message->ProblemDetails->cause));
NULL, "HTTP response error", ausf_ue->suci));
break;
}

View File

@ -76,7 +76,7 @@ void bsf_state_operational(ogs_fsm_t *s, bsf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
NULL, "cannot parse HTTP sbi_message", NULL, NULL));
NULL, "cannot parse HTTP sbi_message", NULL));
break;
}
@ -85,7 +85,7 @@ void bsf_state_operational(ogs_fsm_t *s, bsf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
&message, "Not supported version", NULL, NULL));
&message, "Not supported version", NULL));
ogs_sbi_message_free(&message);
break;
}
@ -105,7 +105,7 @@ void bsf_state_operational(ogs_fsm_t *s, bsf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN, &message,
"Invalid HTTP method", message.h.method, NULL));
"Invalid HTTP method", message.h.method));
END
break;
@ -116,7 +116,7 @@ void bsf_state_operational(ogs_fsm_t *s, bsf_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Invalid resource name",
message.h.resource.component[0], NULL));
message.h.resource.component[0]));
END
break;
@ -166,7 +166,7 @@ void bsf_state_operational(ogs_fsm_t *s, bsf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_NOT_FOUND,
&message, "Not found", message.h.uri, NULL));
&message, "Not found", message.h.uri));
break;
}
@ -180,7 +180,7 @@ void bsf_state_operational(ogs_fsm_t *s, bsf_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Invalid resource name",
message.h.resource.component[0], NULL));
message.h.resource.component[0]));
END
break;
@ -189,7 +189,7 @@ void bsf_state_operational(ogs_fsm_t *s, bsf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Invalid API name", message.h.service.name, NULL));
"Invalid API name", message.h.service.name));
END
/* In lib/sbi/server.c, notify_completed() releases 'request' buffer. */
@ -412,7 +412,7 @@ void bsf_state_operational(ogs_fsm_t *s, bsf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT, NULL,
"Cannot receive SBI message", NULL, NULL));
"Cannot receive SBI message", NULL));
}
break;

View File

@ -303,8 +303,7 @@ cleanup:
ogs_assert(status);
ogs_error("%s", strerror);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, status, recvmsg, strerror, NULL,
NULL));
ogs_sbi_server_send_error(stream, status, recvmsg, strerror, NULL));
ogs_free(strerror);
return false;

View File

@ -96,7 +96,7 @@ int bsf_sbi_discover_and_send(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT, NULL,
"Cannot discover", sess->dnn, NULL));
"Cannot discover", sess->dnn));
return OGS_ERROR;
}
@ -109,7 +109,7 @@ int bsf_sbi_discover_and_send(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT, NULL,
"Cannot discover", sess->dnn, NULL));
"Cannot discover", sess->dnn));
return r;
}

View File

@ -128,8 +128,8 @@ void nrf_nf_state_will_register(ogs_fsm_t *s, nrf_event_t *e)
nf_instance->id, message->h.method);
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_METHOD_NOT_ALLOWED, message,
"Invalid HTTP method", message->h.method, NULL));
OGS_SBI_HTTP_STATUS_MEHTOD_NOT_ALLOWED, message,
"Invalid HTTP method", message->h.method));
END
break;
@ -138,9 +138,9 @@ void nrf_nf_state_will_register(ogs_fsm_t *s, nrf_event_t *e)
nf_instance->id, message->h.resource.component[0]);
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_METHOD_NOT_ALLOWED, message,
OGS_SBI_HTTP_STATUS_MEHTOD_NOT_ALLOWED, message,
"Invalid resource name",
message->h.resource.component[0], NULL));
message->h.resource.component[0]));
END
break;
@ -149,9 +149,8 @@ void nrf_nf_state_will_register(ogs_fsm_t *s, nrf_event_t *e)
nf_instance->id, message->h.service.name);
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_METHOD_NOT_ALLOWED, message,
"Invalid resource name", message->h.service.name,
NULL));
OGS_SBI_HTTP_STATUS_MEHTOD_NOT_ALLOWED, message,
"Invalid resource name", message->h.service.name));
END
OGS_FSM_TRAN(s, nrf_nf_state_registered);
@ -163,8 +162,7 @@ void nrf_nf_state_will_register(ogs_fsm_t *s, nrf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR,
message, "Unknown event", nrf_event_get_name(e),
NULL));
message, "Unknown event", nrf_event_get_name(e)));
OGS_FSM_TRAN(s, nrf_nf_state_exception);
break;
}
@ -258,8 +256,8 @@ void nrf_nf_state_registered(ogs_fsm_t *s, nrf_event_t *e)
nf_instance->id, message->h.method);
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_METHOD_NOT_ALLOWED, message,
"Invalid HTTP method", message->h.method, NULL));
OGS_SBI_HTTP_STATUS_MEHTOD_NOT_ALLOWED, message,
"Invalid HTTP method", message->h.method));
END
break;
@ -268,9 +266,9 @@ void nrf_nf_state_registered(ogs_fsm_t *s, nrf_event_t *e)
nf_instance->id, message->h.resource.component[0]);
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_METHOD_NOT_ALLOWED, message,
OGS_SBI_HTTP_STATUS_MEHTOD_NOT_ALLOWED, message,
"Invalid resource name",
message->h.resource.component[0], NULL));
message->h.resource.component[0]));
END
break;
@ -279,9 +277,8 @@ void nrf_nf_state_registered(ogs_fsm_t *s, nrf_event_t *e)
nf_instance->id, message->h.service.name);
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_METHOD_NOT_ALLOWED, message,
"Invalid resource name", message->h.service.name,
NULL));
OGS_SBI_HTTP_STATUS_MEHTOD_NOT_ALLOWED, message,
"Invalid resource name", message->h.service.name));
END
break;
@ -291,8 +288,7 @@ void nrf_nf_state_registered(ogs_fsm_t *s, nrf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR,
message, "Unknown event", nrf_event_get_name(e),
NULL));
message, "Unknown event", nrf_event_get_name(e)));
OGS_FSM_TRAN(s, nrf_nf_state_exception);
break;
}

View File

@ -42,7 +42,7 @@ bool nrf_nnrf_handle_nf_register(ogs_sbi_nf_instance_t *nf_instance,
ogs_error("No NFProfile");
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No NFProfile", NULL, NULL));
recvmsg, "No NFProfile", NULL));
return false;
}
@ -51,7 +51,7 @@ bool nrf_nnrf_handle_nf_register(ogs_sbi_nf_instance_t *nf_instance,
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No NFProfile.NFInstanceId", NULL, NULL));
recvmsg, "No NFProfile.NFInstanceId", NULL));
return false;
}
@ -60,7 +60,7 @@ bool nrf_nnrf_handle_nf_register(ogs_sbi_nf_instance_t *nf_instance,
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No NFProfile.NFType", NULL, NULL));
recvmsg, "No NFProfile.NFType", NULL));
return false;
}
@ -69,7 +69,7 @@ bool nrf_nnrf_handle_nf_register(ogs_sbi_nf_instance_t *nf_instance,
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No NFProfile.NFStatus", NULL, NULL));
recvmsg, "No NFProfile.NFStatus", NULL));
return false;
}
@ -220,7 +220,7 @@ bool nrf_nnrf_handle_nf_update(ogs_sbi_nf_instance_t *nf_instance,
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No PatchItemList", NULL, NULL));
recvmsg, "No PatchItemList", NULL));
return false;
}
@ -231,7 +231,7 @@ bool nrf_nnrf_handle_nf_update(ogs_sbi_nf_instance_t *nf_instance,
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No PatchItem", NULL, NULL));
recvmsg, "No PatchItem", NULL));
return false;
}
@ -296,15 +296,16 @@ bool nrf_nnrf_handle_nf_status_subscribe(
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "Invalid POST Format",
recvmsg->h.resource.component[1], NULL));
recvmsg->h.resource.component[1]));
return false;
}
SubscriptionData = recvmsg->SubscriptionData;
if (!SubscriptionData) {
ogs_error("No SubscriptionData");
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No SubscriptionData", NULL, NULL));
recvmsg, "No SubscriptionData", NULL));
return false;
}
@ -313,8 +314,7 @@ bool nrf_nnrf_handle_nf_status_subscribe(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No SubscriptionData", "NFStatusNotificationURL",
NULL));
recvmsg, "No SubscriptionData", "NFStatusNotificationURL"));
return false;
}
@ -403,8 +403,7 @@ bool nrf_nnrf_handle_nf_status_subscribe(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "Invalid URI", subscription_data->notification_uri,
NULL));
recvmsg, "Invalid URI", subscription_data->notification_uri));
ogs_sbi_subscription_data_remove(subscription_data);
return false;
}
@ -497,7 +496,7 @@ bool nrf_nnrf_handle_nf_status_update(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No SubscriptionId", NULL, NULL));
recvmsg, "No SubscriptionId", NULL));
return false;
}
@ -508,8 +507,7 @@ bool nrf_nnrf_handle_nf_status_update(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_NOT_FOUND,
recvmsg, "Not found", recvmsg->h.resource.component[1],
NULL));
recvmsg, "Not found", recvmsg->h.resource.component[1]));
return false;
}
ogs_assert(subscription_data->id);
@ -520,8 +518,7 @@ bool nrf_nnrf_handle_nf_status_update(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No PatchItemList", subscription_data->id,
NULL));
recvmsg, "No PatchItemList", subscription_data->id));
return false;
}
@ -532,7 +529,7 @@ bool nrf_nnrf_handle_nf_status_update(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No PatchItem", NULL, NULL));
recvmsg, "No PatchItem", NULL));
return false;
}
@ -637,7 +634,7 @@ bool nrf_nnrf_handle_nf_status_unsubscribe(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No SubscriptionId", NULL, NULL));
recvmsg, "No SubscriptionId", NULL));
return false;
}
@ -648,8 +645,7 @@ bool nrf_nnrf_handle_nf_status_unsubscribe(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_NOT_FOUND,
recvmsg, "Not found", recvmsg->h.resource.component[1],
NULL));
recvmsg, "Not found", recvmsg->h.resource.component[1]));
return false;
}
@ -745,8 +741,7 @@ bool nrf_nnrf_handle_nf_profile_retrieval(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_NOT_FOUND,
recvmsg, "Not found", recvmsg->h.resource.component[1],
NULL));
recvmsg, "Not found", recvmsg->h.resource.component[1]));
return false;
}
@ -788,14 +783,14 @@ bool nrf_nnrf_handle_nf_discover(
ogs_error("No target-nf-type [%s]", recvmsg->h.uri);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No target-nf-type", NULL, NULL));
recvmsg, "No target-nf-type", NULL));
return false;
}
if (!recvmsg->param.requester_nf_type) {
ogs_error("No requester-nf-type [%s]", recvmsg->h.uri);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No requester-nf-type", NULL, NULL));
recvmsg, "No requester-nf-type", NULL));
return false;
}
@ -1009,7 +1004,7 @@ bool nrf_nnrf_handle_nf_discover(
ogs_error("nrf_assoc_add() failed");
ogs_assert(true == ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR,
recvmsg, "nrf_assoc_add() failed", NULL, NULL));
recvmsg, "nrf_assoc_add() failed", NULL));
goto cleanup;
}
@ -1021,8 +1016,7 @@ bool nrf_nnrf_handle_nf_discover(
ogs_error("ogs_nnrf_disc_build_discover() failed");
ogs_assert(true == ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR,
recvmsg, "ogs_nnrf_disc_build_discover() failed", NULL,
NULL));
recvmsg, "ogs_nnrf_disc_build_discover() failed", NULL));
nrf_assoc_remove(assoc);
goto cleanup;
}
@ -1033,8 +1027,7 @@ bool nrf_nnrf_handle_nf_discover(
ogs_error("ogs_sbi_send_request_to_client");
ogs_assert(true == ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR,
recvmsg, "ogs_sbi_send_request_to_client() failed", NULL,
NULL));
recvmsg, "ogs_sbi_send_request_to_client() failed", NULL));
ogs_sbi_request_free(request);
nrf_assoc_remove(assoc);
goto cleanup;
@ -1092,7 +1085,7 @@ static int discover_handler(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR, NULL,
"response_handler() failed", NULL, NULL));
"response_handler() failed", NULL));
nrf_assoc_remove(assoc);

View File

@ -73,7 +73,7 @@ void nrf_state_operational(ogs_fsm_t *s, nrf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
NULL, "cannot parse HTTP message", NULL, NULL));
NULL, "cannot parse HTTP message", NULL));
break;
}
@ -82,7 +82,7 @@ void nrf_state_operational(ogs_fsm_t *s, nrf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
&message, "Not supported version", NULL, NULL));
&message, "Not supported version", NULL));
ogs_sbi_message_free(&message);
break;
}
@ -108,7 +108,7 @@ void nrf_state_operational(ogs_fsm_t *s, nrf_event_t *e)
stream,
OGS_SBI_HTTP_STATUS_NOT_IMPLEMENTED,
&message, "OPTIONS method is not implemented yet",
NULL, NULL));
NULL));
break;
DEFAULT
@ -131,7 +131,7 @@ void nrf_state_operational(ogs_fsm_t *s, nrf_event_t *e)
stream,
OGS_SBI_HTTP_STATUS_PAYLOAD_TOO_LARGE,
&message, "Insufficient space",
message.h.resource.component[1], NULL));
message.h.resource.component[1]));
break;
}
nf_instance = ogs_sbi_nf_instance_add();
@ -153,7 +153,7 @@ void nrf_state_operational(ogs_fsm_t *s, nrf_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_NOT_FOUND,
&message, "Not found",
message.h.resource.component[1], NULL));
message.h.resource.component[1]));
END
}
@ -202,7 +202,7 @@ void nrf_state_operational(ogs_fsm_t *s, nrf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN, &message,
"Invalid HTTP method", message.h.method, NULL));
"Invalid HTTP method", message.h.method));
END
break;
@ -213,7 +213,7 @@ void nrf_state_operational(ogs_fsm_t *s, nrf_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Invalid resource name",
message.h.resource.component[0], NULL));
message.h.resource.component[0]));
END
break;
@ -233,8 +233,7 @@ void nrf_state_operational(ogs_fsm_t *s, nrf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN, &message,
"Invalid HTTP method", message.h.method,
NULL));
"Invalid HTTP method", message.h.method));
END
break;
@ -246,7 +245,7 @@ void nrf_state_operational(ogs_fsm_t *s, nrf_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Invalid resource name",
message.h.resource.component[0], NULL));
message.h.resource.component[0]));
END
break;
@ -255,8 +254,7 @@ void nrf_state_operational(ogs_fsm_t *s, nrf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Invalid API name", message.h.resource.component[0],
NULL));
"Invalid API name", message.h.resource.component[0]));
END
/* In lib/sbi/server.c, notify_completed() releases 'request' buffer. */

View File

@ -84,8 +84,7 @@ cleanup:
ogs_assert(strerror);
ogs_error("%s", strerror);
ogs_sbi_server_send_error(stream, status, recvmsg, strerror, NULL,
NULL);
ogs_sbi_server_send_error(stream, status, recvmsg, strerror, NULL);
ogs_free(strerror);
return false;

View File

@ -74,7 +74,7 @@ void nssf_state_operational(ogs_fsm_t *s, nssf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
NULL, "cannot parse HTTP message", NULL, NULL));
NULL, "cannot parse HTTP message", NULL));
break;
}
@ -91,7 +91,7 @@ void nssf_state_operational(ogs_fsm_t *s, nssf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
&message, "Not supported version", NULL, NULL));
&message, "Not supported version", NULL));
ogs_sbi_message_free(&message);
break;
}
@ -111,8 +111,7 @@ void nssf_state_operational(ogs_fsm_t *s, nssf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN,
&message, "Invalid HTTP method", message.h.method,
NULL));
&message, "Invalid HTTP method", message.h.method));
END
break;
@ -123,7 +122,7 @@ void nssf_state_operational(ogs_fsm_t *s, nssf_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Unknown resource name",
message.h.resource.component[0], NULL));
message.h.resource.component[0]));
END
break;
@ -132,8 +131,7 @@ void nssf_state_operational(ogs_fsm_t *s, nssf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Invalid API name", message.h.resource.component[0],
NULL));
"Invalid API name", message.h.resource.component[0]));
END
/* In lib/sbi/server.c, notify_completed() releases 'request' buffer. */

View File

@ -83,8 +83,8 @@ void pcf_am_state_operational(ogs_fsm_t *s, pcf_event_t *e)
pcf_ue->supi, message->h.method);
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_METHOD_NOT_ALLOWED, message,
"Invalid HTTP method", message->h.method, NULL));
OGS_SBI_HTTP_STATUS_FORBIDDEN, message,
"Invalid HTTP method", message->h.method));
END
break;
@ -113,8 +113,7 @@ void pcf_am_state_operational(ogs_fsm_t *s, pcf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, message->res_status,
NULL, "HTTP response error", pcf_ue->supi,
NULL));
NULL, "HTTP response error", pcf_ue->supi));
break;
}
@ -141,8 +140,7 @@ void pcf_am_state_operational(ogs_fsm_t *s, pcf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, message,
"Invalid API name", message->h.resource.component[0],
NULL));
"Invalid API name", message->h.resource.component[0]));
END
break;

View File

@ -399,8 +399,7 @@ cleanup:
ogs_assert(status);
ogs_error("%s", strerror);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, status, recvmsg, strerror, NULL,
NULL));
ogs_sbi_server_send_error(stream, status, recvmsg, strerror, NULL));
ogs_free(strerror);
OGS_SESSION_DATA_FREE(&session_data);

View File

@ -51,8 +51,7 @@ bool pcf_npcf_am_policy_control_handle_create(pcf_ue_t *pcf_ue,
ogs_error("[%s] No PolicyAssociationRequest", pcf_ue->supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "[%s] No PolicyAssociationRequest", pcf_ue->supi,
NULL));
message, "[%s] No PolicyAssociationRequest", pcf_ue->supi));
return false;
}
@ -60,7 +59,7 @@ bool pcf_npcf_am_policy_control_handle_create(pcf_ue_t *pcf_ue,
ogs_error("[%s] No notificationUri", pcf_ue->supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No notificationUri", pcf_ue->supi, NULL));
message, "No notificationUri", pcf_ue->supi));
return false;
}
@ -68,7 +67,7 @@ bool pcf_npcf_am_policy_control_handle_create(pcf_ue_t *pcf_ue,
ogs_error("[%s] No supi", pcf_ue->supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No supi", pcf_ue->supi, NULL));
message, "No supi", pcf_ue->supi));
return false;
}
@ -76,7 +75,7 @@ bool pcf_npcf_am_policy_control_handle_create(pcf_ue_t *pcf_ue,
ogs_error("[%s] No suppFeat", pcf_ue->supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No suppFeat", pcf_ue->supi, NULL));
message, "No suppFeat", pcf_ue->supi));
return false;
}
@ -87,7 +86,7 @@ bool pcf_npcf_am_policy_control_handle_create(pcf_ue_t *pcf_ue,
pcf_ue->supi, PolicyAssociationRequest->notification_uri);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "[%s] Invalid URI", pcf_ue->supi, NULL));
message, "[%s] Invalid URI", pcf_ue->supi));
return false;
}
@ -547,21 +546,8 @@ cleanup:
ogs_assert(status);
ogs_assert(strerror);
ogs_error("%s", strerror);
/*
* TS29.512
* 4.2.2.2 SM Policy Association establishment
*
* If the PCF is, due to incomplete, erroneous or missing
* information (e.g. QoS, RAT type, subscriber information)
* not able to provision a policy decision as response to
* the request for PCC rules by the SMF, the PCF may reject
* the request and include in an HTTP "400 Bad Request"
* response message the "cause" attribute of the ProblemDetails
* data structure set to "ERROR_INITIAL_PARAMETERS".
*/
ogs_assert(true ==
ogs_sbi_server_send_error(stream, status, message,
strerror, NULL, "ERROR_INITIAL_PARAMETERS"));
ogs_sbi_server_send_error(stream, status, message, strerror, NULL));
ogs_free(strerror);
return false;
@ -619,8 +605,7 @@ cleanup:
ogs_assert(strerror);
ogs_error("%s", strerror);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, status, message, strerror, NULL,
NULL));
ogs_sbi_server_send_error(stream, status, message, strerror, NULL));
ogs_free(strerror);
return false;
@ -1086,8 +1071,7 @@ cleanup:
ogs_assert(strerror);
ogs_error("%s", strerror);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, status, recvmsg, strerror, NULL,
NULL));
ogs_sbi_server_send_error(stream, status, recvmsg, strerror, NULL));
ogs_free(strerror);
OpenAPI_list_for_each(PccRuleList, node) {
@ -1499,8 +1483,7 @@ cleanup:
ogs_assert(strerror);
ogs_error("%s", strerror);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, status, recvmsg, strerror,
NULL, NULL));
ogs_sbi_server_send_error(stream, status, recvmsg, strerror, NULL));
ogs_free(strerror);
OpenAPI_list_for_each(PccRuleList, node) {

View File

@ -174,8 +174,7 @@ cleanup:
ogs_assert(status);
ogs_error("%s", strerror);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, status, recvmsg, strerror,
NULL, NULL));
ogs_sbi_server_send_error(stream, status, recvmsg, strerror, NULL));
ogs_free(strerror);
ogs_subscription_data_free(&subscription_data);
@ -250,22 +249,10 @@ bool pcf_nudr_dr_handle_query_sm_data(
cleanup:
ogs_assert(strerror);
status = OGS_SBI_HTTP_STATUS_FORBIDDEN;
ogs_assert(status);
ogs_error("%s", strerror);
/*
* TS29.512
* 4.2.2.2 SM Policy Association establishment
*
* If the PCF, based on local configuration and/or operator
* policies, denies the creation of the Individual SM Policy
* resource, the PCF may reject the request and include in
* an HTTP "403 Forbidden" response message the "cause"
* attribute of the ProblemDetails data structure set to
* "POLICY_CONTEXT_DENIED".
*/
ogs_assert(true ==
ogs_sbi_server_send_error(stream, status, recvmsg, strerror,
NULL, "POLICY_CONTEXT_DENIED"));
ogs_sbi_server_send_error(stream, status, recvmsg, strerror, NULL));
ogs_free(strerror);
return false;

View File

@ -79,7 +79,7 @@ void pcf_state_operational(ogs_fsm_t *s, pcf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
NULL, "cannot parse HTTP message", NULL, NULL));
NULL, "cannot parse HTTP message", NULL));
break;
}
@ -88,7 +88,7 @@ void pcf_state_operational(ogs_fsm_t *s, pcf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
&message, "Not supported version", NULL, NULL));
&message, "Not supported version", NULL));
ogs_sbi_message_free(&message);
break;
}
@ -108,7 +108,7 @@ void pcf_state_operational(ogs_fsm_t *s, pcf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN, &message,
"Invalid HTTP method", message.h.method, NULL));
"Invalid HTTP method", message.h.method));
END
break;
@ -119,7 +119,7 @@ void pcf_state_operational(ogs_fsm_t *s, pcf_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Unknown resource name",
message.h.resource.component[0], NULL));
message.h.resource.component[0]));
END
break;
@ -153,7 +153,7 @@ void pcf_state_operational(ogs_fsm_t *s, pcf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_NOT_FOUND,
&message, "Not found", message.h.method, NULL));
&message, "Not found", message.h.method));
break;
}
@ -204,21 +204,13 @@ void pcf_state_operational(ogs_fsm_t *s, pcf_event_t *e)
DEFAULT
END
if (!sess) {
ogs_error("Not found [%s]", message.h.uri);
/*
* TS29.512
* 4.2.2.2 SM Policy Association establishment
*
* If the user information received within the "supi" attribute is
* unknown, the PCF shall reject the request with an HTTP "400 Bad
* Request" response message including the "cause" attribute
* of the ProblemDetails data structure set to "USER_UNKNOWN".
*/
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
&message, "Not found", message.h.uri, "USER_UNKNOWN"));
OGS_SBI_HTTP_STATUS_NOT_FOUND,
&message, "Not found", message.h.uri));
break;
}
@ -268,7 +260,7 @@ void pcf_state_operational(ogs_fsm_t *s, pcf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_NOT_FOUND,
&message, "Not found", message.h.uri, NULL));
&message, "Not found", message.h.uri));
break;
}
@ -290,7 +282,7 @@ void pcf_state_operational(ogs_fsm_t *s, pcf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Invalid API name", message.h.service.name, NULL));
"Invalid API name", message.h.service.name));
END
/* In lib/sbi/server.c, notify_completed() releases 'request' buffer. */
@ -702,7 +694,7 @@ void pcf_state_operational(ogs_fsm_t *s, pcf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT, NULL,
"Cannot receive SBI message", NULL, NULL));
"Cannot receive SBI message", NULL));
break;
default:

View File

@ -174,7 +174,7 @@ int pcf_ue_sbi_discover_and_send(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT, NULL,
"Cannot discover", pcf_ue->supi, NULL));
"Cannot discover", pcf_ue->supi));
return r;
}
@ -217,7 +217,7 @@ int pcf_sess_sbi_discover_and_send(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT, NULL,
"Cannot discover", NULL, NULL));
"Cannot discover", NULL));
return r;
}

View File

@ -96,8 +96,8 @@ void pcf_sm_state_operational(ogs_fsm_t *s, pcf_event_t *e)
pcf_ue->supi, sess->psi, message->h.uri);
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_METHOD_NOT_ALLOWED, message,
"Invalid HTTP method", message->h.uri, NULL));
OGS_SBI_HTTP_STATUS_FORBIDDEN, message,
"Invalid HTTP method", message->h.uri));
END
}
break;
@ -116,8 +116,8 @@ void pcf_sm_state_operational(ogs_fsm_t *s, pcf_event_t *e)
message->h.resource.component[2]);
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, message,
"Invalid resource name", message->h.uri, NULL));
OGS_SBI_HTTP_STATUS_FORBIDDEN, message,
"Invalid resource name", message->h.uri));
END
} else {
SWITCH(message->h.method)
@ -130,8 +130,8 @@ void pcf_sm_state_operational(ogs_fsm_t *s, pcf_event_t *e)
pcf_ue->supi, sess->psi, message->h.method);
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_METHOD_NOT_ALLOWED, message,
"Invalid HTTP method", message->h.uri, NULL));
OGS_SBI_HTTP_STATUS_FORBIDDEN, message,
"Invalid HTTP method", message->h.uri));
END
}
} else {
@ -145,8 +145,8 @@ void pcf_sm_state_operational(ogs_fsm_t *s, pcf_event_t *e)
pcf_ue->supi, sess->psi, message->h.method);
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_METHOD_NOT_ALLOWED, message,
"Invalid HTTP method", message->h.uri, NULL));
OGS_SBI_HTTP_STATUS_FORBIDDEN, message,
"Invalid HTTP method", message->h.uri));
END
}
break;
@ -176,42 +176,14 @@ void pcf_sm_state_operational(ogs_fsm_t *s, pcf_event_t *e)
OGS_SBI_HTTP_STATUS_NOT_FOUND) {
ogs_warn("[%s:%d] Cannot find SUPI [%d]",
pcf_ue->supi, sess->psi, message->res_status);
/*
* TS29.512
* 4.2.2.2 SM Policy Association establishment
*
* If the user information received within the "supi"
* attribute is unknown, the PCF shall reject the
* request with an HTTP "400 Bad Request" response
* message including the "cause" attribute of the
* ProblemDetails data structure set to "USER_UNKNOWN".
*/
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
NULL, "End user is unknown to the PCF",
pcf_ue->supi, "USER_UNKNOWN"));
} else {
ogs_error("[%s:%d] HTTP response error [%d]",
pcf_ue->supi, sess->psi, message->res_status);
/*
* TS29.512
* 4.2.2.2 SM Policy Association establishment
*
* If the PCF, based on local configuration and/or
* operator policies, denies the creation of the
* Individual SM Policy resource, the PCF may reject
* the request and include in an HTTP "403 Forbidden"
* response message the "cause" attribute of the
* ProblemDetails data structure set to
* "POLICY_CONTEXT_DENIED".
*/
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_FORBIDDEN,
NULL, "HTTP response error",
pcf_ue->supi, "POLICY_CONTEXT_DENIED"));
}
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, message->res_status,
NULL, "HTTP response error", pcf_ue->supi));
break;
}

View File

@ -631,7 +631,7 @@ static int response_handler(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR, NULL,
"response_handler() failed", NULL, NULL));
"response_handler() failed", NULL));
scp_assoc_remove(assoc);
@ -700,7 +700,7 @@ static int nf_discover_handler(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR, NULL,
"nf_discover_handler() failed", NULL, NULL));
"nf_discover_handler() failed", NULL));
scp_assoc_remove(assoc);
return OGS_ERROR;
@ -787,8 +787,7 @@ cleanup:
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST, NULL, strerror, NULL,
NULL));
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST, NULL, strerror, NULL));
ogs_free(strerror);
@ -830,7 +829,7 @@ static int sepp_discover_handler(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR, NULL,
"sepp_discover_handler() failed", NULL, NULL));
"sepp_discover_handler() failed", NULL));
scp_assoc_remove(assoc);
return OGS_ERROR;
@ -882,8 +881,7 @@ cleanup:
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST, NULL, strerror, NULL,
NULL));
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST, NULL, strerror, NULL));
ogs_free(strerror);

View File

@ -72,8 +72,7 @@ void scp_state_operational(ogs_fsm_t *s, scp_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
NULL, "cannot parse HTTP sbi_message", NULL,
NULL));
NULL, "cannot parse HTTP sbi_message", NULL));
break;
}
@ -82,7 +81,7 @@ void scp_state_operational(ogs_fsm_t *s, scp_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
&message, "Not supported version", NULL, NULL));
&message, "Not supported version", NULL));
ogs_sbi_message_free(&message);
break;
}
@ -102,8 +101,7 @@ void scp_state_operational(ogs_fsm_t *s, scp_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN, &message,
"Invalid HTTP method", message.h.method,
NULL));
"Invalid HTTP method", message.h.method));
END
break;
@ -114,7 +112,7 @@ void scp_state_operational(ogs_fsm_t *s, scp_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Invalid resource name",
message.h.resource.component[0], NULL));
message.h.resource.component[0]));
END
break;
@ -123,7 +121,7 @@ void scp_state_operational(ogs_fsm_t *s, scp_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Invalid API name", message.h.service.name, NULL));
"Invalid API name", message.h.service.name));
END
/* In lib/sbi/server.c, notify_completed() releases 'request' buffer. */
@ -316,7 +314,7 @@ void scp_state_operational(ogs_fsm_t *s, scp_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT, NULL,
"Cannot receive SBI message", NULL, NULL));
"Cannot receive SBI message", NULL));
}
break;

View File

@ -154,7 +154,7 @@ void sepp_handshake_state_will_establish(ogs_fsm_t *s, sepp_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "PRINS is not supported",
sepp_node->receiver, NULL));
sepp_node->receiver));
} else if (sepp_node->negotiated_security_scheme ==
OpenAPI_security_capability_NONE) {
@ -341,7 +341,7 @@ void sepp_handshake_state_established(ogs_fsm_t *s, sepp_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "PRINS is not supported",
sepp_node->receiver, NULL));
sepp_node->receiver));
} else if (sepp_node->negotiated_security_scheme ==
OpenAPI_security_capability_NONE) {
@ -483,7 +483,7 @@ void sepp_handshake_state_terminated(ogs_fsm_t *s, sepp_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "PRINS is not supported",
sepp_node->receiver, NULL));
sepp_node->receiver));
} else if (sepp_node->negotiated_security_scheme ==
OpenAPI_security_capability_NONE) {

View File

@ -40,8 +40,7 @@ bool sepp_n32c_handshake_handle_security_capability_request(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No SecNegotiateReqData", sepp_node->receiver,
NULL));
recvmsg, "No SecNegotiateReqData", sepp_node->receiver));
return false;
}
@ -50,8 +49,7 @@ bool sepp_n32c_handshake_handle_security_capability_request(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No SecNegotiateReqData.sender", sepp_node->receiver,
NULL));
recvmsg, "No SecNegotiateReqData.sender", sepp_node->receiver));
return false;
}
@ -68,7 +66,7 @@ bool sepp_n32c_handshake_handle_security_capability_request(
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No supported_sec_capability_list",
sepp_node->receiver, NULL));
sepp_node->receiver));
return false;
}
@ -106,7 +104,7 @@ bool sepp_n32c_handshake_handle_security_capability_request(
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "Unknown SupportedSecCapability",
sepp_node->receiver, NULL));
sepp_node->receiver));
return false;
}

View File

@ -422,7 +422,7 @@ static int response_handler(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR, NULL,
"response_handler() failed", NULL, NULL));
"response_handler() failed", NULL));
sepp_assoc_remove(assoc);

View File

@ -76,7 +76,7 @@ void sepp_state_operational(ogs_fsm_t *s, sepp_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
NULL, "cannot parse HTTP sbi_message", NULL, NULL));
NULL, "cannot parse HTTP sbi_message", NULL));
break;
}
@ -85,7 +85,7 @@ void sepp_state_operational(ogs_fsm_t *s, sepp_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
&message, "Not supported version", NULL, NULL));
&message, "Not supported version", NULL));
ogs_sbi_message_free(&message);
break;
}
@ -111,7 +111,7 @@ void sepp_state_operational(ogs_fsm_t *s, sepp_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN, &message,
"Invalid HTTP method", message.h.method, NULL));
"Invalid HTTP method", message.h.method));
END
break;
@ -122,7 +122,7 @@ void sepp_state_operational(ogs_fsm_t *s, sepp_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Invalid resource name",
message.h.resource.component[0], NULL));
message.h.resource.component[0]));
END
break;
@ -157,7 +157,7 @@ void sepp_state_operational(ogs_fsm_t *s, sepp_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN, &message,
"Invalid HTTP method", message.h.method, NULL));
"Invalid HTTP method", message.h.method));
END
break;
@ -168,7 +168,7 @@ void sepp_state_operational(ogs_fsm_t *s, sepp_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Invalid resource name",
message.h.resource.component[0], NULL));
message.h.resource.component[0]));
END
if (!sepp_node) {
@ -176,7 +176,7 @@ void sepp_state_operational(ogs_fsm_t *s, sepp_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_NOT_FOUND,
&message, "Not found", message.h.method, NULL));
&message, "Not found", message.h.method));
break;
}
@ -194,7 +194,7 @@ void sepp_state_operational(ogs_fsm_t *s, sepp_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Invalid API name", message.h.service.name, NULL));
"Invalid API name", message.h.service.name));
END
/* In lib/sbi/server.c, notify_completed() releases 'request' buffer. */

View File

@ -263,7 +263,7 @@ void smf_gsm_state_initial(ogs_fsm_t *s, smf_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, sbi_message,
"Invalid resource name [%s]",
sbi_message->h.resource.component[2], NULL));
sbi_message->h.resource.component[2]));
OGS_FSM_TRAN(s, smf_gsm_state_exception);
break;
DEFAULT
@ -280,8 +280,7 @@ void smf_gsm_state_initial(ogs_fsm_t *s, smf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, sbi_message,
"Invalid API name", sbi_message->h.service.name,
NULL));
"Invalid API name", sbi_message->h.service.name));
OGS_FSM_TRAN(s, smf_gsm_state_exception);
END
break;
@ -316,8 +315,7 @@ void smf_gsm_state_initial(ogs_fsm_t *s, smf_event_t *e)
ogs_error("%s", strerror);
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, NULL, strerror,
NULL, NULL));
OGS_SBI_HTTP_STATUS_BAD_REQUEST, NULL, strerror, NULL));
ogs_free(strerror);
OGS_FSM_TRAN(s, smf_gsm_state_exception);
@ -479,8 +477,7 @@ void smf_gsm_state_wait_5gc_sm_policy_association(ogs_fsm_t *s, smf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, sbi_message->res_status,
sbi_message, strerror, NULL,
sbi_message->ProblemDetails->cause));
sbi_message, strerror, NULL));
ogs_free(strerror);
OGS_FSM_TRAN(s, smf_gsm_state_exception);
@ -504,7 +501,7 @@ void smf_gsm_state_wait_5gc_sm_policy_association(ogs_fsm_t *s, smf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
sbi_message, strerror, NULL, NULL));
sbi_message, strerror, NULL));
ogs_free(strerror);
OGS_FSM_TRAN(s, smf_gsm_state_exception);
@ -875,7 +872,7 @@ void smf_gsm_state_operational(ogs_fsm_t *s, smf_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, sbi_message,
"Invalid resource name [%s]",
sbi_message->h.resource.component[2], NULL));
sbi_message->h.resource.component[2]));
OGS_FSM_TRAN(s, smf_gsm_state_exception);
END
break;
@ -885,8 +882,7 @@ void smf_gsm_state_operational(ogs_fsm_t *s, smf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, sbi_message,
"Invalid API name", sbi_message->h.service.name,
NULL));
"Invalid API name", sbi_message->h.service.name));
OGS_FSM_TRAN(s, smf_gsm_state_exception);
END
break;
@ -917,8 +913,7 @@ void smf_gsm_state_operational(ogs_fsm_t *s, smf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, sbi_message->res_status,
sbi_message, strerror, NULL,
sbi_message->ProblemDetails->cause));
sbi_message, strerror, NULL));
ogs_free(strerror);
OGS_FSM_TRAN(s, smf_gsm_state_exception);
@ -998,7 +993,7 @@ void smf_gsm_state_operational(ogs_fsm_t *s, smf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
sbi_message, strerror, NULL, NULL));
sbi_message, strerror, NULL));
ogs_free(strerror);
OGS_FSM_TRAN(s, smf_gsm_state_exception);
END
@ -1015,7 +1010,7 @@ void smf_gsm_state_operational(ogs_fsm_t *s, smf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
sbi_message, strerror, NULL, NULL));
sbi_message, strerror, NULL));
ogs_free(strerror);
OGS_FSM_TRAN(s, smf_gsm_state_exception);
END
@ -1105,8 +1100,7 @@ void smf_gsm_state_operational(ogs_fsm_t *s, smf_event_t *e)
ogs_error("%s", strerror);
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, NULL, strerror,
NULL, NULL));
OGS_SBI_HTTP_STATUS_BAD_REQUEST, NULL, strerror, NULL));
ogs_free(strerror);
}
break;
@ -1163,8 +1157,7 @@ void smf_gsm_state_operational(ogs_fsm_t *s, smf_event_t *e)
ogs_error("%s", strerror);
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, NULL, strerror,
NULL, NULL));
OGS_SBI_HTTP_STATUS_BAD_REQUEST, NULL, strerror, NULL));
ogs_free(strerror);
OGS_FSM_TRAN(s, smf_gsm_state_exception);
@ -1608,7 +1601,7 @@ void smf_gsm_state_wait_5gc_n1_n2_release(ogs_fsm_t *s, smf_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, sbi_message,
"Invalid resource name [%s]",
sbi_message->h.resource.component[2], NULL));
sbi_message->h.resource.component[2]));
OGS_FSM_TRAN(s, smf_gsm_state_exception);
END
break;
@ -1618,8 +1611,7 @@ void smf_gsm_state_wait_5gc_n1_n2_release(ogs_fsm_t *s, smf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, sbi_message,
"Invalid API name", sbi_message->h.service.name,
NULL));
"Invalid API name", sbi_message->h.service.name));
OGS_FSM_TRAN(s, smf_gsm_state_exception);
END
break;
@ -1712,8 +1704,7 @@ void smf_gsm_state_wait_5gc_n1_n2_release(ogs_fsm_t *s, smf_event_t *e)
ogs_error("%s", strerror);
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, NULL, strerror,
NULL, NULL));
OGS_SBI_HTTP_STATUS_BAD_REQUEST, NULL, strerror, NULL));
ogs_free(strerror);
OGS_FSM_TRAN(s, smf_gsm_state_exception);
@ -1780,8 +1771,7 @@ void smf_gsm_state_wait_5gc_n1_n2_release(ogs_fsm_t *s, smf_event_t *e)
ogs_error("%s", strerror);
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, NULL, strerror,
NULL, NULL));
OGS_SBI_HTTP_STATUS_BAD_REQUEST, NULL, strerror, NULL));
ogs_free(strerror);
}
break;
@ -1948,7 +1938,7 @@ void smf_gsm_state_5gc_session_will_deregister(ogs_fsm_t *s, smf_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, sbi_message,
"Invalid resource name [%s]",
sbi_message->h.resource.component[2], NULL));
sbi_message->h.resource.component[2]));
OGS_FSM_TRAN(s, smf_gsm_state_exception);
END
break;
@ -1958,8 +1948,7 @@ void smf_gsm_state_5gc_session_will_deregister(ogs_fsm_t *s, smf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, sbi_message,
"Invalid API name", sbi_message->h.service.name,
NULL));
"Invalid API name", sbi_message->h.service.name));
OGS_FSM_TRAN(s, smf_gsm_state_exception);
END
break;

View File

@ -705,7 +705,7 @@ int smf_5gc_n4_handle_session_deletion_response(
ogs_assert(stream);
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, status, NULL, strerror, NULL, NULL));
stream, status, NULL, strerror, NULL));
} else if (trigger == OGS_PFCP_DELETE_TRIGGER_PCF_INITIATED) {
/* No stream - Nothing */
} else {

View File

@ -198,7 +198,7 @@ bool smf_namf_comm_handle_n1_n2_message_transfer_failure_notify(
ogs_error("No N1N2MsgTxfrFailureNotification");
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No N1N2MsgTxfrFailureNotification", NULL, NULL));
recvmsg, "No N1N2MsgTxfrFailureNotification", NULL));
return false;
}
@ -206,7 +206,7 @@ bool smf_namf_comm_handle_n1_n2_message_transfer_failure_notify(
ogs_error("No Cause");
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No Cause", NULL, NULL));
recvmsg, "No Cause", NULL));
return false;
}
@ -214,7 +214,7 @@ bool smf_namf_comm_handle_n1_n2_message_transfer_failure_notify(
ogs_error("No n1n2MsgDataUri");
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No n1n2MsgDataUri", NULL, NULL));
recvmsg, "No n1n2MsgDataUri", NULL));
return false;
}
@ -225,7 +225,7 @@ bool smf_namf_comm_handle_n1_n2_message_transfer_failure_notify(
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_NOT_FOUND,
recvmsg, N1N2MsgTxfrFailureNotification->n1n2_msg_data_uri,
NULL, NULL));
NULL));
return false;
}

View File

@ -697,7 +697,7 @@ cleanup:
ogs_error("%s", strerror);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, strerror, NULL, NULL));
recvmsg, strerror, NULL));
ogs_free(strerror);
return false;

View File

@ -373,7 +373,7 @@ cleanup:
ogs_error("%s", strerror);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, strerror, NULL, NULL));
recvmsg, strerror, NULL));
ogs_free(strerror);
return false;

View File

@ -283,8 +283,7 @@ static void sess_5gc_timeout(ogs_pfcp_xact_t *xact, void *data)
ogs_assert(stream);
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT, NULL, strerror,
NULL, NULL));
OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT, NULL, strerror, NULL));
} else {
ogs_fatal("Unknown trigger [%d]", trigger);
ogs_assert_if_reached();

View File

@ -206,7 +206,7 @@ int smf_sbi_discover_and_send(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT, NULL,
"Cannot discover", smf_ue->supi, NULL));
"Cannot discover", smf_ue->supi));
return OGS_ERROR;
}
@ -222,7 +222,7 @@ int smf_sbi_discover_and_send(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT, NULL,
"Cannot discover", smf_ue->supi, NULL));
"Cannot discover", smf_ue->supi));
return r;
}

View File

@ -429,8 +429,7 @@ void smf_state_operational(ogs_fsm_t *s, smf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
NULL, "cannot parse HTTP sbi_message", NULL,
NULL));
NULL, "cannot parse HTTP sbi_message", NULL));
break;
}
@ -448,7 +447,7 @@ void smf_state_operational(ogs_fsm_t *s, smf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
&sbi_message, "Not supported version", NULL, NULL));
&sbi_message, "Not supported version", NULL));
ogs_sbi_message_free(&sbi_message);
break;
}
@ -468,7 +467,7 @@ void smf_state_operational(ogs_fsm_t *s, smf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN, &sbi_message,
"Invalid HTTP method", sbi_message.h.method, NULL));
"Invalid HTTP method", sbi_message.h.method));
END
break;
@ -479,7 +478,7 @@ void smf_state_operational(ogs_fsm_t *s, smf_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &sbi_message,
"Invalid resource name",
sbi_message.h.resource.component[0], NULL));
sbi_message.h.resource.component[0]));
END
break;
@ -534,8 +533,7 @@ void smf_state_operational(ogs_fsm_t *s, smf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &sbi_message,
"Invalid HTTP method", sbi_message.h.method,
NULL));
"Invalid HTTP method", sbi_message.h.method));
break;
END
@ -557,7 +555,7 @@ void smf_state_operational(ogs_fsm_t *s, smf_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &sbi_message,
"Invalid resource name",
sbi_message.h.resource.component[0], NULL));
sbi_message.h.resource.component[0]));
END
break;
@ -575,7 +573,7 @@ void smf_state_operational(ogs_fsm_t *s, smf_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &sbi_message,
"No smContextRef",
sbi_message.h.resource.component[1], NULL));
sbi_message.h.resource.component[1]));
break;
}
@ -588,7 +586,7 @@ void smf_state_operational(ogs_fsm_t *s, smf_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_NOT_FOUND, &sbi_message,
"Not found",
sbi_message.h.resource.component[1], NULL));
sbi_message.h.resource.component[1]));
break;
}
@ -608,7 +606,7 @@ void smf_state_operational(ogs_fsm_t *s, smf_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &sbi_message,
"Invalid resource name",
sbi_message.h.resource.component[0], NULL));
sbi_message.h.resource.component[0]));
END
break;
DEFAULT
@ -618,7 +616,7 @@ void smf_state_operational(ogs_fsm_t *s, smf_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &sbi_message,
"Invalid resource name",
sbi_message.h.resource.component[0], NULL));
sbi_message.h.resource.component[0]));
END
break;
@ -627,7 +625,7 @@ void smf_state_operational(ogs_fsm_t *s, smf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &sbi_message,
"Invalid API name", sbi_message.h.service.name, NULL));
"Invalid API name", sbi_message.h.service.name));
END
/* In lib/sbi/server.c, notify_completed() releases 'request' buffer. */
@ -854,7 +852,7 @@ void smf_state_operational(ogs_fsm_t *s, smf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
NULL, strerror, NULL, NULL));
NULL, strerror, NULL));
ogs_free(strerror);
break;
}
@ -978,7 +976,7 @@ void smf_state_operational(ogs_fsm_t *s, smf_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT, NULL,
"Cannot receive SBI message", NULL, NULL));
"Cannot receive SBI message", NULL));
}
break;

View File

@ -37,8 +37,7 @@ bool udm_nudm_ueau_handle_get(
ogs_error("[%s] No AuthenticationInfoRequest", udm_ue->suci);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No AuthenticationInfoRequest", udm_ue->suci,
NULL));
recvmsg, "No AuthenticationInfoRequest", udm_ue->suci));
return false;
}
@ -46,7 +45,7 @@ bool udm_nudm_ueau_handle_get(
ogs_error("[%s] No servingNetworkName", udm_ue->suci);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No servingNetworkName", udm_ue->suci, NULL));
recvmsg, "No servingNetworkName", udm_ue->suci));
return false;
}
@ -54,7 +53,7 @@ bool udm_nudm_ueau_handle_get(
ogs_error("[%s] No ausfInstanceId", udm_ue->suci);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No ausfInstanceId", udm_ue->suci, NULL));
recvmsg, "No ausfInstanceId", udm_ue->suci));
return false;
}
@ -91,7 +90,7 @@ bool udm_nudm_ueau_handle_get(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No RAND", udm_ue->suci, NULL));
recvmsg, "No RAND", udm_ue->suci));
return false;
}
@ -100,7 +99,7 @@ bool udm_nudm_ueau_handle_get(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No AUTS", udm_ue->suci, NULL));
recvmsg, "No AUTS", udm_ue->suci));
return false;
}
@ -119,7 +118,7 @@ bool udm_nudm_ueau_handle_get(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "Invalid RAND", udm_ue->suci, NULL));
recvmsg, "Invalid RAND", udm_ue->suci));
return false;
}
@ -134,7 +133,7 @@ bool udm_nudm_ueau_handle_get(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_UNAUTHORIZED,
recvmsg, "Re-sync MAC failed", udm_ue->suci, NULL));
recvmsg, "Re-sync MAC failed", udm_ue->suci));
return false;
}
@ -188,7 +187,7 @@ bool udm_nudm_ueau_handle_result_confirmation_inform(
ogs_error("[%s] No AuthEvent", udm_ue->suci);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No AuthEvent", udm_ue->suci, NULL));
message, "No AuthEvent", udm_ue->suci));
return false;
}
@ -196,7 +195,7 @@ bool udm_nudm_ueau_handle_result_confirmation_inform(
ogs_error("[%s] No nfInstanceId", udm_ue->suci);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No nfInstanceId", udm_ue->suci, NULL));
message, "No nfInstanceId", udm_ue->suci));
return false;
}
@ -204,7 +203,7 @@ bool udm_nudm_ueau_handle_result_confirmation_inform(
ogs_error("[%s] No success", udm_ue->suci);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No success", udm_ue->suci, NULL));
message, "No success", udm_ue->suci));
return false;
}
@ -212,7 +211,7 @@ bool udm_nudm_ueau_handle_result_confirmation_inform(
ogs_error("[%s] No timeStamp", udm_ue->suci);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No timeStamp", udm_ue->suci, NULL));
message, "No timeStamp", udm_ue->suci));
return false;
}
@ -220,7 +219,7 @@ bool udm_nudm_ueau_handle_result_confirmation_inform(
ogs_error("[%s] No authType", udm_ue->suci);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No authType", udm_ue->suci, NULL));
message, "No authType", udm_ue->suci));
return false;
}
@ -228,7 +227,7 @@ bool udm_nudm_ueau_handle_result_confirmation_inform(
ogs_error("[%s] No servingNetworkName", udm_ue->suci);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No servingNetworkName", udm_ue->suci, NULL));
message, "No servingNetworkName", udm_ue->suci));
return false;
}
@ -260,8 +259,7 @@ bool udm_nudm_uecm_handle_amf_registration(
ogs_error("[%s] No Amf3GppAccessRegistration", udm_ue->supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No Amf3GppAccessRegistration", udm_ue->supi,
NULL));
message, "No Amf3GppAccessRegistration", udm_ue->supi));
return false;
}
@ -269,7 +267,7 @@ bool udm_nudm_uecm_handle_amf_registration(
ogs_error("[%s] No amfInstanceId", udm_ue->supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No amfInstanceId", udm_ue->supi, NULL));
message, "No amfInstanceId", udm_ue->supi));
return false;
}
@ -277,7 +275,7 @@ bool udm_nudm_uecm_handle_amf_registration(
ogs_error("[%s] No dregCallbackUri", udm_ue->supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No dregCallbackUri", udm_ue->supi, NULL));
message, "No dregCallbackUri", udm_ue->supi));
return false;
}
@ -286,7 +284,7 @@ bool udm_nudm_uecm_handle_amf_registration(
ogs_error("[%s] No Guami", udm_ue->supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No Guami", udm_ue->supi, NULL));
message, "No Guami", udm_ue->supi));
return false;
}
@ -294,7 +292,7 @@ bool udm_nudm_uecm_handle_amf_registration(
ogs_error("[%s] No Guami.AmfId", udm_ue->supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No Guami.AmfId", udm_ue->supi, NULL));
message, "No Guami.AmfId", udm_ue->supi));
return false;
}
@ -302,7 +300,7 @@ bool udm_nudm_uecm_handle_amf_registration(
ogs_error("[%s] No PlmnId", udm_ue->supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No PlmnId", udm_ue->supi, NULL));
message, "No PlmnId", udm_ue->supi));
return false;
}
@ -310,7 +308,7 @@ bool udm_nudm_uecm_handle_amf_registration(
ogs_error("[%s] No PlmnId.Mnc", udm_ue->supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No PlmnId.Mnc", udm_ue->supi, NULL));
message, "No PlmnId.Mnc", udm_ue->supi));
return false;
}
@ -318,7 +316,7 @@ bool udm_nudm_uecm_handle_amf_registration(
ogs_error("[%s] No PlmnId.Mcc", udm_ue->supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No PlmnId.Mcc", udm_ue->supi, NULL));
message, "No PlmnId.Mcc", udm_ue->supi));
return false;
}
@ -326,7 +324,7 @@ bool udm_nudm_uecm_handle_amf_registration(
ogs_error("[%s] No RatType", udm_ue->supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No RatType", udm_ue->supi, NULL));
message, "No RatType", udm_ue->supi));
return false;
}
@ -373,8 +371,7 @@ bool udm_nudm_uecm_handle_amf_registration_update(
ogs_error("[%s] No Amf3GppAccessRegistrationModification", udm_ue->supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No Amf3GppAccessRegistrationModification", udm_ue->supi,
NULL));
message, "No Amf3GppAccessRegistrationModification", udm_ue->supi));
return false;
}
@ -383,7 +380,7 @@ bool udm_nudm_uecm_handle_amf_registration_update(
ogs_error("[%s] No Guami", udm_ue->supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No Guami", udm_ue->supi, NULL));
message, "No Guami", udm_ue->supi));
return false;
}
@ -391,7 +388,7 @@ bool udm_nudm_uecm_handle_amf_registration_update(
ogs_error("[%s] No Guami.AmfId", udm_ue->supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No Guami.AmfId", udm_ue->supi, NULL));
message, "No Guami.AmfId", udm_ue->supi));
return false;
}
@ -399,7 +396,7 @@ bool udm_nudm_uecm_handle_amf_registration_update(
ogs_error("[%s] No PlmnId", udm_ue->supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No PlmnId", udm_ue->supi, NULL));
message, "No PlmnId", udm_ue->supi));
return false;
}
@ -407,7 +404,7 @@ bool udm_nudm_uecm_handle_amf_registration_update(
ogs_error("[%s] No PlmnId.Mnc", udm_ue->supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No PlmnId.Mnc", udm_ue->supi, NULL));
message, "No PlmnId.Mnc", udm_ue->supi));
return false;
}
@ -415,7 +412,7 @@ bool udm_nudm_uecm_handle_amf_registration_update(
ogs_error("[%s] No PlmnId.Mcc", udm_ue->supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No PlmnId.Mcc", udm_ue->supi, NULL));
message, "No PlmnId.Mcc", udm_ue->supi));
return false;
}
@ -427,25 +424,9 @@ bool udm_nudm_uecm_handle_amf_registration_update(
ogs_sbi_parse_guami(&recv_guami, Guami);
if (memcmp(&recv_guami, &udm_ue->guami, sizeof(recv_guami)) != 0) {
ogs_error("[%s] Guami mismatch", udm_ue->supi);
/*
* TS29.503
* 6.2.7.3 Application Errors
*
* Protocol and application errors common to several 5GC SBI API
* specifications for which the NF shall include in the HTTP
* response a payload body ("ProblemDetails" data structure or
* application specific error data structure) with the "cause"
* attribute indicating corresponding error are listed in table
* 5.2.7.2-1.
* Application Error: INVALID_GUAMI
* HTTP status code: 403 Forbidden
* Description: The AMF is not allowed to modify the registration
* information stored in the UDM, as it is not the registered AMF.
*/
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_FORBIDDEN,
message, "Guami mismatch", udm_ue->supi,
"INVALID_GUAMI"));
message, "Guami mismatch", udm_ue->supi));
return false;
}
@ -499,7 +480,7 @@ bool udm_nudm_uecm_handle_smf_registration(
ogs_error("[%s:%d] No SmfRegistration", udm_ue->supi, sess->psi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No SmfRegistration", udm_ue->supi, NULL));
message, "No SmfRegistration", udm_ue->supi));
return false;
}
@ -507,7 +488,7 @@ bool udm_nudm_uecm_handle_smf_registration(
ogs_error("[%s:%d] No smfInstanceId", udm_ue->supi, sess->psi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No smfInstanceId", udm_ue->supi, NULL));
message, "No smfInstanceId", udm_ue->supi));
return false;
}
@ -515,7 +496,7 @@ bool udm_nudm_uecm_handle_smf_registration(
ogs_error("[%s:%d] No pduSessionId", udm_ue->supi, sess->psi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No pduSessionId", udm_ue->supi, NULL));
message, "No pduSessionId", udm_ue->supi));
return false;
}
@ -523,7 +504,7 @@ bool udm_nudm_uecm_handle_smf_registration(
ogs_error("[%s:%d] No singleNssai", udm_ue->supi, sess->psi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No singleNssai", udm_ue->supi, NULL));
message, "No singleNssai", udm_ue->supi));
return false;
}
@ -531,7 +512,7 @@ bool udm_nudm_uecm_handle_smf_registration(
ogs_error("[%s:%d] No dnn", udm_ue->supi, sess->psi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No dnn", udm_ue->supi, NULL));
message, "No dnn", udm_ue->supi));
return false;
}
@ -540,7 +521,7 @@ bool udm_nudm_uecm_handle_smf_registration(
ogs_error("[%s:%d] No plmnId", udm_ue->supi, sess->psi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
message, "No plmnId", udm_ue->supi, NULL));
message, "No plmnId", udm_ue->supi));
return false;
}
@ -631,7 +612,7 @@ bool udm_nudm_sdm_handle_subscription_create(
ogs_error("[%s] No SDMSubscription", udm_ue->supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No SDMSubscription", udm_ue->supi, NULL));
recvmsg, "No SDMSubscription", udm_ue->supi));
return false;
}
@ -639,7 +620,7 @@ bool udm_nudm_sdm_handle_subscription_create(
ogs_error("[%s] No nfInstanceId", udm_ue->supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No nfInstanceId", udm_ue->supi, NULL));
recvmsg, "No nfInstanceId", udm_ue->supi));
return false;
}
@ -647,7 +628,7 @@ bool udm_nudm_sdm_handle_subscription_create(
ogs_error("[%s] No callbackReference", udm_ue->supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No callbackReference", udm_ue->supi, NULL));
recvmsg, "No callbackReference", udm_ue->supi));
return false;
}
@ -656,7 +637,7 @@ bool udm_nudm_sdm_handle_subscription_create(
ogs_error("[%s] No monitoredResourceUris", udm_ue->supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No monitoredResourceUris", udm_ue->supi, NULL));
recvmsg, "No monitoredResourceUris", udm_ue->supi));
return false;
}
@ -708,7 +689,7 @@ bool udm_nudm_sdm_handle_subscription_delete(
ogs_error("[%s] No subscriptionID", udm_ue->supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No subscriptionID", udm_ue->supi, NULL));
recvmsg, "No subscriptionID", udm_ue->supi));
return false;
}
sdm_subscription = udm_sdm_subscription_find_by_id(
@ -722,8 +703,7 @@ bool udm_nudm_sdm_handle_subscription_delete(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_NOT_FOUND,
recvmsg, "Subscription Not found", recvmsg->h.method,
NULL));
recvmsg, "Subscription Not found", recvmsg->h.method));
return false;
}

View File

@ -88,8 +88,7 @@ bool udm_nudr_dr_handle_subscription_authentication(
ogs_error("%s", strerror);
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, recvmsg->res_status, recvmsg, strerror, NULL,
recvmsg->ProblemDetails->cause));
stream, recvmsg->res_status, recvmsg, strerror, NULL));
ogs_free(strerror);
return false;
}
@ -101,7 +100,7 @@ bool udm_nudr_dr_handle_subscription_authentication(
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR,
recvmsg, "No AuthenticationSubscription",
udm_ue->suci, NULL));
udm_ue->suci));
return false;
}
@ -113,8 +112,7 @@ bool udm_nudr_dr_handle_subscription_authentication(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN,
recvmsg, "Not supported Auth Method", udm_ue->suci,
NULL));
recvmsg, "Not supported Auth Method", udm_ue->suci));
return false;
}
@ -124,8 +122,7 @@ bool udm_nudr_dr_handle_subscription_authentication(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR,
recvmsg, "No encPermanentKey", udm_ue->suci,
NULL));
recvmsg, "No encPermanentKey", udm_ue->suci));
return false;
}
if (!AuthenticationSubscription->enc_opc_key) {
@ -133,7 +130,7 @@ bool udm_nudr_dr_handle_subscription_authentication(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR,
recvmsg, "No encPermanentKey", udm_ue->suci, NULL));
recvmsg, "No encPermanentKey", udm_ue->suci));
return false;
}
if (!AuthenticationSubscription->authentication_management_field) {
@ -142,8 +139,7 @@ bool udm_nudr_dr_handle_subscription_authentication(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR,
recvmsg, "No authenticationManagementField", udm_ue->suci,
NULL));
recvmsg, "No authenticationManagementField", udm_ue->suci));
return false;
}
if (!AuthenticationSubscription->sequence_number) {
@ -151,7 +147,7 @@ bool udm_nudr_dr_handle_subscription_authentication(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR,
recvmsg, "No SequenceNumber", udm_ue->suci, NULL));
recvmsg, "No SequenceNumber", udm_ue->suci));
return false;
}
if (!AuthenticationSubscription->sequence_number->sqn) {
@ -159,7 +155,7 @@ bool udm_nudr_dr_handle_subscription_authentication(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR,
recvmsg, "No SequenceNumber.sqn", udm_ue->suci, NULL));
recvmsg, "No SequenceNumber.sqn", udm_ue->suci));
return false;
}
@ -193,8 +189,7 @@ bool udm_nudr_dr_handle_subscription_authentication(
ogs_error("%s", strerror);
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, recvmsg->res_status, recvmsg, strerror, NULL,
recvmsg->ProblemDetails->cause));
stream, recvmsg->res_status, recvmsg, strerror, NULL));
ogs_free(strerror);
return false;
}
@ -266,7 +261,7 @@ bool udm_nudr_dr_handle_subscription_authentication(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN, recvmsg,
"Invalid HTTP method", recvmsg->h.method, NULL));
"Invalid HTTP method", recvmsg->h.method));
return false;
END
break;
@ -282,8 +277,7 @@ bool udm_nudr_dr_handle_subscription_authentication(
ogs_error("%s", strerror);
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, recvmsg->res_status, recvmsg, strerror, NULL,
recvmsg->ProblemDetails->cause));
stream, recvmsg->res_status, recvmsg, strerror, NULL));
ogs_free(strerror);
return false;
}
@ -294,7 +288,7 @@ bool udm_nudr_dr_handle_subscription_authentication(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No AuthEvent", udm_ue->suci, NULL));
recvmsg, "No AuthEvent", udm_ue->suci));
return false;
}
@ -303,7 +297,7 @@ bool udm_nudr_dr_handle_subscription_authentication(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No nfInstanceId", udm_ue->suci, NULL));
recvmsg, "No nfInstanceId", udm_ue->suci));
return false;
}
@ -312,7 +306,7 @@ bool udm_nudr_dr_handle_subscription_authentication(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No success", udm_ue->suci, NULL));
recvmsg, "No success", udm_ue->suci));
return false;
}
@ -321,7 +315,7 @@ bool udm_nudr_dr_handle_subscription_authentication(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No timeStamp", udm_ue->suci, NULL));
recvmsg, "No timeStamp", udm_ue->suci));
return false;
}
@ -330,7 +324,7 @@ bool udm_nudr_dr_handle_subscription_authentication(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No authType", udm_ue->suci, NULL));
recvmsg, "No authType", udm_ue->suci));
return false;
}
@ -339,7 +333,7 @@ bool udm_nudr_dr_handle_subscription_authentication(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No servingNetworkName", udm_ue->suci, NULL));
recvmsg, "No servingNetworkName", udm_ue->suci));
return false;
}
@ -382,7 +376,7 @@ bool udm_nudr_dr_handle_subscription_authentication(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, strerror, NULL, NULL));
recvmsg, strerror, NULL));
ogs_free(strerror);
return false;
END
@ -414,8 +408,7 @@ bool udm_nudr_dr_handle_subscription_context(
udm_ue->supi, recvmsg->res_status);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, recvmsg->res_status,
NULL, "HTTP response error", udm_ue->supi,
recvmsg->ProblemDetails->cause));
NULL, "HTTP response error", udm_ue->supi));
return false;
}
@ -440,7 +433,7 @@ bool udm_nudr_dr_handle_subscription_context(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, strerror, NULL, NULL));
recvmsg, strerror, NULL));
ogs_free(strerror);
return false;
END
@ -459,8 +452,7 @@ bool udm_nudr_dr_handle_subscription_context(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No Amf3GppAccessRegistration", udm_ue->supi,
NULL));
recvmsg, "No Amf3GppAccessRegistration", udm_ue->supi));
return false;
}
@ -469,7 +461,7 @@ bool udm_nudr_dr_handle_subscription_context(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No amfInstanceId", udm_ue->supi, NULL));
recvmsg, "No amfInstanceId", udm_ue->supi));
return false;
}
@ -478,7 +470,7 @@ bool udm_nudr_dr_handle_subscription_context(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No dregCallbackUri", udm_ue->supi, NULL));
recvmsg, "No dregCallbackUri", udm_ue->supi));
return false;
}
@ -488,7 +480,7 @@ bool udm_nudr_dr_handle_subscription_context(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No Guami", udm_ue->supi, NULL));
recvmsg, "No Guami", udm_ue->supi));
return false;
}
@ -497,7 +489,7 @@ bool udm_nudr_dr_handle_subscription_context(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No Guami.AmfId", udm_ue->supi, NULL));
recvmsg, "No Guami.AmfId", udm_ue->supi));
return false;
}
@ -506,7 +498,7 @@ bool udm_nudr_dr_handle_subscription_context(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No PlmnId", udm_ue->supi, NULL));
recvmsg, "No PlmnId", udm_ue->supi));
return false;
}
@ -515,7 +507,7 @@ bool udm_nudr_dr_handle_subscription_context(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No PlmnId.Mnc", udm_ue->supi, NULL));
recvmsg, "No PlmnId.Mnc", udm_ue->supi));
return false;
}
@ -524,7 +516,7 @@ bool udm_nudr_dr_handle_subscription_context(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No PlmnId.Mcc", udm_ue->supi, NULL));
recvmsg, "No PlmnId.Mcc", udm_ue->supi));
return false;
}
@ -533,7 +525,7 @@ bool udm_nudr_dr_handle_subscription_context(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No RatType", udm_ue->supi, NULL));
recvmsg, "No RatType", udm_ue->supi));
return false;
}
@ -592,7 +584,7 @@ bool udm_nudr_dr_handle_subscription_context(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, strerror, NULL, NULL));
recvmsg, strerror, NULL));
ogs_free(strerror);
return false;
END
@ -630,7 +622,7 @@ bool udm_nudr_dr_handle_subscription_provisioned(
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No AccessAndMobilitySubscriptionData",
udm_ue->supi, NULL));
udm_ue->supi));
return false;
}
@ -659,7 +651,7 @@ bool udm_nudr_dr_handle_subscription_provisioned(
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No SmfSelectionSubscriptionData",
udm_ue->supi, NULL));
udm_ue->supi));
return false;
}
@ -692,7 +684,7 @@ bool udm_nudr_dr_handle_subscription_provisioned(
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No SessionManagementSubscriptionData",
udm_ue->supi, NULL));
udm_ue->supi));
return false;
}
@ -731,7 +723,7 @@ bool udm_nudr_dr_handle_subscription_provisioned(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, strerror, NULL, NULL));
recvmsg, strerror, NULL));
ogs_free(strerror);
return false;
END
@ -767,8 +759,7 @@ bool udm_nudr_dr_handle_smf_registration(
udm_ue->supi, sess->psi, recvmsg->res_status);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, recvmsg->res_status,
NULL, "HTTP response error", udm_ue->supi,
recvmsg->ProblemDetails->cause));
NULL, "HTTP response error", udm_ue->supi));
return false;
}
@ -785,7 +776,7 @@ bool udm_nudr_dr_handle_smf_registration(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No SmfRegistration", udm_ue->supi, NULL));
recvmsg, "No SmfRegistration", udm_ue->supi));
return false;
}
@ -794,7 +785,7 @@ bool udm_nudr_dr_handle_smf_registration(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No smfInstanceId", udm_ue->supi, NULL));
recvmsg, "No smfInstanceId", udm_ue->supi));
return false;
}
@ -803,8 +794,7 @@ bool udm_nudr_dr_handle_smf_registration(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No pduSessionId", udm_ue->supi,
NULL));
recvmsg, "No pduSessionId", udm_ue->supi));
return false;
}
@ -814,7 +804,7 @@ bool udm_nudr_dr_handle_smf_registration(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No singleNssai", udm_ue->supi, NULL));
recvmsg, "No singleNssai", udm_ue->supi));
return false;
}
@ -823,7 +813,7 @@ bool udm_nudr_dr_handle_smf_registration(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No dnn", udm_ue->supi, NULL));
recvmsg, "No dnn", udm_ue->supi));
return false;
}
@ -834,7 +824,7 @@ bool udm_nudr_dr_handle_smf_registration(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No plmnId", udm_ue->supi, NULL));
recvmsg, "No plmnId", udm_ue->supi));
return false;
}
@ -892,7 +882,7 @@ bool udm_nudr_dr_handle_smf_registration(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN, recvmsg,
"Invalid HTTP method", recvmsg->h.method, NULL));
"Invalid HTTP method", recvmsg->h.method));
END
break;
@ -905,7 +895,7 @@ bool udm_nudr_dr_handle_smf_registration(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, strerror, NULL, NULL));
recvmsg, strerror, NULL));
ogs_free(strerror);
return false;
END

View File

@ -147,7 +147,7 @@ int udm_ue_sbi_discover_and_send(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT, NULL,
"Cannot discover", udm_ue->suci, NULL));
"Cannot discover", udm_ue->suci));
return r;
}
@ -170,7 +170,7 @@ int udm_sess_sbi_discover_and_send(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT, NULL,
"Cannot discover", NULL, NULL));
"Cannot discover", NULL));
return r;
}

View File

@ -85,8 +85,7 @@ void udm_sess_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN, message,
"Invalid HTTP method", message->h.method,
NULL));
"Invalid HTTP method", message->h.method));
END
break;
DEFAULT
@ -96,7 +95,7 @@ void udm_sess_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, message,
"Invalid HTTP method", message->h.method, NULL));
"Invalid HTTP method", message->h.method));
END
break;
@ -105,7 +104,7 @@ void udm_sess_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, message,
"Invalid API name", message->h.service.name, NULL));
"Invalid API name", message->h.service.name));
END
break;

View File

@ -75,7 +75,7 @@ void udm_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
NULL, "cannot parse HTTP message", NULL, NULL));
NULL, "cannot parse HTTP message", NULL));
break;
}
@ -92,7 +92,7 @@ void udm_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
&message, "Not supported version", NULL, NULL));
&message, "Not supported version", NULL));
ogs_sbi_message_free(&message);
break;
}
@ -113,8 +113,7 @@ void udm_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN, &message,
"Invalid HTTP method", message.h.method,
NULL));
"Invalid HTTP method", message.h.method));
END
break;
@ -125,7 +124,7 @@ void udm_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Unknown resource name",
message.h.resource.component[0], NULL));
message.h.resource.component[0]));
END
break;
@ -137,7 +136,7 @@ void udm_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_NOT_FOUND,
&message, "Not found", message.h.method, NULL));
&message, "Not found", message.h.method));
break;
}
@ -146,8 +145,7 @@ void udm_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
&message, "Invalid resource name", message.h.method,
NULL));
&message, "Invalid resource name", message.h.method));
break;
}
@ -171,7 +169,7 @@ void udm_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
&message, NULL, NULL, NULL));
&message, NULL, NULL));
break;
}
}
@ -182,7 +180,7 @@ void udm_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_NOT_FOUND,
&message, "Not found", message.h.method, NULL));
&message, "Not found", message.h.method));
break;
}
@ -231,7 +229,7 @@ void udm_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Invalid API name", message.h.service.name, NULL));
"Invalid API name", message.h.service.name));
END
/* In lib/sbi/server.c, notify_completed() releases 'request' buffer. */
@ -551,7 +549,7 @@ void udm_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT, NULL,
"Cannot receive SBI message", NULL, NULL));
"Cannot receive SBI message", NULL));
break;
default:

View File

@ -80,7 +80,7 @@ void udm_ue_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, message,
"Invalid resource name", message->h.method, NULL));
"Invalid resource name", message->h.method));
END
break;
@ -96,7 +96,7 @@ void udm_ue_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, message,
"Invalid resource name", message->h.method, NULL));
"Invalid resource name", message->h.method));
END
break;
@ -106,7 +106,7 @@ void udm_ue_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN, message,
"Invalid HTTP method", message->h.method, NULL));
"Invalid HTTP method", message->h.method));
END
break;
@ -125,7 +125,7 @@ void udm_ue_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, message,
"Invalid HTTP method", message->h.method, NULL));
"Invalid HTTP method", message->h.method));
END
break;
CASE(OGS_SBI_HTTP_METHOD_PATCH)
@ -141,7 +141,7 @@ void udm_ue_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, message,
"Invalid HTTP method", message->h.method, NULL));
"Invalid HTTP method", message->h.method));
END
break;
DEFAULT
@ -150,7 +150,7 @@ void udm_ue_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN, message,
"Invalid HTTP method", message->h.method, NULL));
"Invalid HTTP method", message->h.method));
END
break;
@ -180,7 +180,7 @@ void udm_ue_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, message,
"Invalid resource name", message->h.method, NULL));
"Invalid resource name", message->h.method));
END
break;
@ -197,7 +197,7 @@ void udm_ue_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, message,
"Invalid resource name", message->h.method, NULL));
"Invalid resource name", message->h.method));
END
break;
@ -214,7 +214,7 @@ void udm_ue_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, message,
"Invalid resource name", message->h.method, NULL));
"Invalid resource name", message->h.method));
END
break;
DEFAULT
@ -223,8 +223,7 @@ void udm_ue_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_NOT_FOUND, message,
"Invalid HTTP method", message->h.method,
NULL));
"Invalid HTTP method", message->h.method));
END
break;
@ -233,7 +232,7 @@ void udm_ue_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, message,
"Invalid API name", message->h.service.name, NULL));
"Invalid API name", message->h.service.name));
END
break;
@ -287,8 +286,7 @@ void udm_ue_state_operational(ogs_fsm_t *s, udm_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, message,
"Invalid API name", message->h.resource.component[0],
NULL));
"Invalid API name", message->h.resource.component[0]));
END
break;

View File

@ -50,7 +50,7 @@ bool udr_nudr_dr_handle_subscription_authentication(
ogs_error("No SUPI");
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No SUPI", NULL, NULL));
recvmsg, "No SUPI", NULL));
return false;
}
@ -59,7 +59,7 @@ bool udr_nudr_dr_handle_subscription_authentication(
ogs_error("[%s] Unknown SUPI Type", supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_FORBIDDEN,
recvmsg, "Unknwon SUPI Type", supi, NULL));
recvmsg, "Unknwon SUPI Type", supi));
return false;
}
@ -68,7 +68,7 @@ bool udr_nudr_dr_handle_subscription_authentication(
ogs_warn("[%s] Cannot find SUPI in DB", supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_NOT_FOUND,
recvmsg, "Cannot find SUPI Type", supi, NULL));
recvmsg, "Cannot find SUPI Type", supi));
return false;
}
@ -128,7 +128,7 @@ bool udr_nudr_dr_handle_subscription_authentication(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No PatchItemList Array", NULL, NULL));
recvmsg, "No PatchItemList Array", NULL));
return false;
}
@ -146,7 +146,7 @@ bool udr_nudr_dr_handle_subscription_authentication(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No PatchItemList", NULL, NULL));
recvmsg, "No PatchItemList", NULL));
return false;
}
@ -160,7 +160,7 @@ bool udr_nudr_dr_handle_subscription_authentication(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR,
recvmsg, "Cannot update SQN", supi, NULL));
recvmsg, "Cannot update SQN", supi));
return false;
}
@ -170,7 +170,7 @@ bool udr_nudr_dr_handle_subscription_authentication(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR,
recvmsg, "Cannot increment SQN", supi, NULL));
recvmsg, "Cannot increment SQN", supi));
return false;
}
@ -187,9 +187,8 @@ bool udr_nudr_dr_handle_subscription_authentication(
ogs_error("Invalid HTTP method [%s]", recvmsg->h.method);
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_METHOD_NOT_ALLOWED,
recvmsg, "Invalid HTTP method", recvmsg->h.method,
NULL));
OGS_SBI_HTTP_STATUS_MEHTOD_NOT_ALLOWED,
recvmsg, "Invalid HTTP method", recvmsg->h.method));
END
break;
@ -206,7 +205,7 @@ bool udr_nudr_dr_handle_subscription_authentication(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No AuthEvent", supi, NULL));
recvmsg, "No AuthEvent", supi));
return false;
}
@ -217,7 +216,7 @@ bool udr_nudr_dr_handle_subscription_authentication(
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_INTERNAL_SERVER_ERROR,
recvmsg, "Cannot increment SQN", supi, NULL));
recvmsg, "Cannot increment SQN", supi));
return false;
}
@ -232,9 +231,8 @@ bool udr_nudr_dr_handle_subscription_authentication(
ogs_error("Invalid HTTP method [%s]", recvmsg->h.method);
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_METHOD_NOT_ALLOWED,
recvmsg, "Invalid HTTP method", recvmsg->h.method,
NULL));
OGS_SBI_HTTP_STATUS_MEHTOD_NOT_ALLOWED,
recvmsg, "Invalid HTTP method", recvmsg->h.method));
END
break;
@ -243,9 +241,9 @@ bool udr_nudr_dr_handle_subscription_authentication(
recvmsg->h.resource.component[3]);
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_METHOD_NOT_ALLOWED,
OGS_SBI_HTTP_STATUS_MEHTOD_NOT_ALLOWED,
recvmsg, "Unknown resource name",
recvmsg->h.resource.component[3], NULL));
recvmsg->h.resource.component[3]));
END
return false;
@ -267,7 +265,7 @@ bool udr_nudr_dr_handle_subscription_context(
ogs_error("No SUPI");
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No SUPI", NULL, NULL));
recvmsg, "No SUPI", NULL));
return false;
}
@ -276,7 +274,7 @@ bool udr_nudr_dr_handle_subscription_context(
ogs_error("[%s] Unknown SUPI Type", supi);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, OGS_SBI_HTTP_STATUS_FORBIDDEN,
recvmsg, "Unknwon SUPI Type", supi, NULL));
recvmsg, "Unknwon SUPI Type", supi));
return false;
}
@ -292,7 +290,7 @@ bool udr_nudr_dr_handle_subscription_context(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No Amf3GppAccessRegistration", supi, NULL));
recvmsg, "No Amf3GppAccessRegistration", supi));
return false;
}
@ -338,7 +336,7 @@ bool udr_nudr_dr_handle_subscription_context(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No PatchItemList", supi, NULL));
recvmsg, "No PatchItemList", supi));
return false;
}
@ -357,9 +355,8 @@ bool udr_nudr_dr_handle_subscription_context(
ogs_error("Invalid HTTP method [%s]", recvmsg->h.method);
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_METHOD_NOT_ALLOWED,
recvmsg, "Invalid HTTP method", recvmsg->h.method,
NULL));
OGS_SBI_HTTP_STATUS_MEHTOD_NOT_ALLOWED,
recvmsg, "Invalid HTTP method", recvmsg->h.method));
END
break;
CASE(OGS_SBI_RESOURCE_NAME_SMF_REGISTRATIONS)
@ -373,7 +370,7 @@ bool udr_nudr_dr_handle_subscription_context(
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
recvmsg, "No SmfRegistration", supi, NULL));
recvmsg, "No SmfRegistration", supi));
return false;
}
@ -400,9 +397,8 @@ bool udr_nudr_dr_handle_subscription_context(
ogs_error("Invalid HTTP method [%s]", recvmsg->h.method);
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_METHOD_NOT_ALLOWED,
recvmsg, "Invalid HTTP method", recvmsg->h.method,
NULL));
OGS_SBI_HTTP_STATUS_MEHTOD_NOT_ALLOWED,
recvmsg, "Invalid HTTP method", recvmsg->h.method));
END
break;
@ -411,9 +407,9 @@ bool udr_nudr_dr_handle_subscription_context(
recvmsg->h.resource.component[3]);
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_METHOD_NOT_ALLOWED,
OGS_SBI_HTTP_STATUS_MEHTOD_NOT_ALLOWED,
recvmsg, "Unknown resource name",
recvmsg->h.resource.component[3], NULL));
recvmsg->h.resource.component[3]));
END
return false;
@ -1033,7 +1029,7 @@ bool udr_nudr_dr_handle_subscription_provisioned(
DEFAULT
strerror = ogs_msprintf("Invalid resource name [%s]",
recvmsg->h.resource.component[3]);
status = OGS_SBI_HTTP_STATUS_METHOD_NOT_ALLOWED;
status = OGS_SBI_HTTP_STATUS_MEHTOD_NOT_ALLOWED;
goto cleanup;
END
@ -1046,8 +1042,7 @@ cleanup:
ogs_assert(status);
ogs_error("%s", strerror);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, status, recvmsg, strerror, NULL,
NULL));
ogs_sbi_server_send_error(stream, status, recvmsg, strerror, NULL));
ogs_free(strerror);
ogs_subscription_data_free(&subscription_data);
@ -1268,7 +1263,7 @@ bool udr_nudr_dr_handle_policy_data(
DEFAULT
strerror = ogs_msprintf("Invalid resource name [%s]",
recvmsg->h.resource.component[3]);
status = OGS_SBI_HTTP_STATUS_METHOD_NOT_ALLOWED;
status = OGS_SBI_HTTP_STATUS_MEHTOD_NOT_ALLOWED;
goto cleanup;
END
@ -1277,7 +1272,7 @@ bool udr_nudr_dr_handle_policy_data(
DEFAULT
strerror = ogs_msprintf("Invalid HTTP method [%s]",
recvmsg->h.method);
status = OGS_SBI_HTTP_STATUS_METHOD_NOT_ALLOWED;
status = OGS_SBI_HTTP_STATUS_MEHTOD_NOT_ALLOWED;
goto cleanup;
END
@ -1286,7 +1281,7 @@ bool udr_nudr_dr_handle_policy_data(
DEFAULT
strerror = ogs_msprintf("Invalid resource name [%s]",
recvmsg->h.resource.component[1]);
status = OGS_SBI_HTTP_STATUS_METHOD_NOT_ALLOWED;
status = OGS_SBI_HTTP_STATUS_MEHTOD_NOT_ALLOWED;
goto cleanup;
END
@ -1299,8 +1294,7 @@ cleanup:
ogs_assert(status);
ogs_error("%s", strerror);
ogs_assert(true ==
ogs_sbi_server_send_error(stream, status, recvmsg, strerror,
NULL, NULL));
ogs_sbi_server_send_error(stream, status, recvmsg, strerror, NULL));
ogs_free(strerror);
ogs_subscription_data_free(&subscription_data);

View File

@ -72,7 +72,7 @@ void udr_state_operational(ogs_fsm_t *s, udr_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
NULL, "cannot parse HTTP message", NULL, NULL));
NULL, "cannot parse HTTP message", NULL));
break;
}
@ -81,7 +81,7 @@ void udr_state_operational(ogs_fsm_t *s, udr_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
&message, "Not supported version", NULL, NULL));
&message, "Not supported version", NULL));
ogs_sbi_message_free(&message);
break;
}
@ -102,8 +102,7 @@ void udr_state_operational(ogs_fsm_t *s, udr_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN,
&message, "Invalid HTTP method", message.h.method,
NULL));
&message, "Invalid HTTP method", message.h.method));
END
break;
@ -114,7 +113,7 @@ void udr_state_operational(ogs_fsm_t *s, udr_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Unknown resource name",
message.h.resource.component[0], NULL));
message.h.resource.component[0]));
END
break;
@ -146,7 +145,7 @@ void udr_state_operational(ogs_fsm_t *s, udr_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN,
&message, "Invalid HTTP method",
message.h.method, NULL));
message.h.method));
END
break;
DEFAULT
@ -156,7 +155,7 @@ void udr_state_operational(ogs_fsm_t *s, udr_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
&message, "Unknown resource name",
message.h.resource.component[2], NULL));
message.h.resource.component[2]));
END
END
break;
@ -172,7 +171,7 @@ void udr_state_operational(ogs_fsm_t *s, udr_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST,
&message, "Unknown resource name",
message.h.resource.component[0], NULL));
message.h.resource.component[0]));
END
break;
@ -181,8 +180,7 @@ void udr_state_operational(ogs_fsm_t *s, udr_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Invalid API name", message.h.resource.component[0],
NULL));
"Invalid API name", message.h.resource.component[0]));
END
/* In lib/sbi/server.c, notify_completed() releases 'request' buffer. */

View File

@ -816,7 +816,6 @@ static void upf_sess_urr_acc_validity_time_setup(upf_sess_t *sess, ogs_pfcp_urr_
ogs_timer_start(urr_acc->t_validity_time,
ogs_time_from_sec(urr->quota_validity_time));
}
static void upf_sess_urr_acc_time_quota_setup(upf_sess_t *sess, ogs_pfcp_urr_t *urr)
{
upf_sess_urr_acc_t *urr_acc = &sess->urr_acc[urr->id];
@ -828,7 +827,6 @@ static void upf_sess_urr_acc_time_quota_setup(upf_sess_t *sess, ogs_pfcp_urr_t *
upf_sess_urr_acc_timers_cb, urr);
ogs_timer_start(urr_acc->t_time_quota, ogs_time_from_sec(urr->time_quota));
}
static void upf_sess_urr_acc_time_threshold_setup(upf_sess_t *sess, ogs_pfcp_urr_t *urr)
{
upf_sess_urr_acc_t *urr_acc = &sess->urr_acc[urr->id];

View File

@ -77,7 +77,7 @@ void af_state_operational(ogs_fsm_t *s, af_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
NULL, "cannot parse HTTP sbi_message", NULL, NULL));
NULL, "cannot parse HTTP sbi_message", NULL));
break;
}
@ -86,7 +86,7 @@ void af_state_operational(ogs_fsm_t *s, af_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
&message, "Not supported version", NULL, NULL));
&message, "Not supported version", NULL));
ogs_sbi_message_free(&message);
break;
}
@ -106,7 +106,7 @@ void af_state_operational(ogs_fsm_t *s, af_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_FORBIDDEN, &message,
"Invalid HTTP method", message.h.method, NULL));
"Invalid HTTP method", message.h.method));
END
break;
@ -117,7 +117,7 @@ void af_state_operational(ogs_fsm_t *s, af_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Invalid resource name",
message.h.resource.component[0], NULL));
message.h.resource.component[0]));
END
break;
@ -133,7 +133,7 @@ void af_state_operational(ogs_fsm_t *s, af_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_NOT_FOUND,
&message, "Not found",
message.h.resource.component[1], NULL));
message.h.resource.component[1]));
break;
}
@ -146,7 +146,7 @@ void af_state_operational(ogs_fsm_t *s, af_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_NOT_FOUND,
&message, "Not found",
message.h.resource.component[1], NULL));
message.h.resource.component[1]));
break;
}
@ -163,7 +163,7 @@ void af_state_operational(ogs_fsm_t *s, af_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Invalid resource name",
message.h.resource.component[2], NULL));
message.h.resource.component[2]));
END
break;
DEFAULT
@ -173,7 +173,7 @@ void af_state_operational(ogs_fsm_t *s, af_event_t *e)
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Invalid resource name",
message.h.resource.component[0], NULL));
message.h.resource.component[0]));
END
break;
@ -182,7 +182,7 @@ void af_state_operational(ogs_fsm_t *s, af_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
"Invalid API name", message.h.service.name, NULL));
"Invalid API name", message.h.service.name));
END
/* In lib/sbi/server.c, notify_completed() releases 'request' buffer. */
@ -497,7 +497,7 @@ void af_state_operational(ogs_fsm_t *s, af_event_t *e)
ogs_assert(true ==
ogs_sbi_server_send_error(stream,
OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT, NULL,
"Cannot receive SBI message", NULL, NULL));
"Cannot receive SBI message", NULL));
}
break;