[SBI] Add support for DeregistrationData in SBI messages
This commit is contained in:
parent
d1a2971990
commit
0633774972
|
@ -173,6 +173,8 @@ void ogs_sbi_message_free(ogs_sbi_message_t *message)
|
|||
OpenAPI_sm_policy_notification_free(message->SmPolicyNotification);
|
||||
if (message->TerminationNotification)
|
||||
OpenAPI_termination_notification_free(message->TerminationNotification);
|
||||
if (message->DeregistrationData)
|
||||
OpenAPI_deregistration_data_free(message->DeregistrationData);
|
||||
|
||||
for (i = 0; i < message->num_of_part; i++) {
|
||||
if (message->part[i].pkbuf)
|
||||
|
@ -888,6 +890,10 @@ static char *build_json(ogs_sbi_message_t *message)
|
|||
item = OpenAPI_termination_notification_convertToJSON(
|
||||
message->TerminationNotification);
|
||||
ogs_assert(item);
|
||||
} else if (message->DeregistrationData) {
|
||||
item = OpenAPI_deregistration_data_convertToJSON(
|
||||
message->DeregistrationData);
|
||||
ogs_assert(item);
|
||||
}
|
||||
|
||||
if (item) {
|
||||
|
@ -1726,6 +1732,15 @@ static int parse_json(ogs_sbi_message_t *message,
|
|||
}
|
||||
break;
|
||||
|
||||
CASE(OGS_SBI_RESOURCE_NAME_DEREG_NOTIFY)
|
||||
message->DeregistrationData =
|
||||
OpenAPI_deregistration_data_parseFromJSON(item);
|
||||
if (!message->DeregistrationData) {
|
||||
rv = OGS_ERROR;
|
||||
ogs_error("JSON parse error");
|
||||
}
|
||||
break;
|
||||
|
||||
DEFAULT
|
||||
rv = OGS_ERROR;
|
||||
ogs_error("Unknown resource name [%s]",
|
||||
|
|
|
@ -408,6 +408,7 @@ typedef struct ogs_sbi_message_s {
|
|||
*AppSessionContextUpdateDataPatch;
|
||||
OpenAPI_sm_policy_notification_t *SmPolicyNotification;
|
||||
OpenAPI_termination_notification_t *TerminationNotification;
|
||||
OpenAPI_deregistration_data_t *DeregistrationData;
|
||||
|
||||
ogs_sbi_links_t *links;
|
||||
|
||||
|
|
|
@ -73,6 +73,7 @@
|
|||
#include "model/policy_update.h"
|
||||
#include "model/sm_policy_notification.h"
|
||||
#include "model/termination_notification.h"
|
||||
#include "model/deregistration_data.h"
|
||||
|
||||
#include "custom/links.h"
|
||||
#include "custom/ue_authentication_ctx.h"
|
||||
|
|
Loading…
Reference in New Issue