Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMF crash fix & log cleanup #177

Merged
merged 8 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion callback/api_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func SmPolicyControlTerminationRequestNotification(c *gin.Context) {
}

func N1N2FailureNotification(c *gin.Context) {
logger.PduSessLog.Info("Recieve N1N2 Failure Notification")
logger.PduSessLog.Info("Receive N1N2 Failure Notification")
stats.IncrementN11MsgStats(smf_context.SMF_Self().NfInstanceID, string(svcmsgtypes.N1N2MessageTransferFailureNotification), "In", "", "")

var request models.N1N2MsgTxfrFailureNotification
Expand Down
4 changes: 3 additions & 1 deletion context/sm_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,9 @@ func (smContext *SMContext) PublishSmCtxtInfo() {

//Populate kafka sm ctxt struct
kafkaSmCtxt.Imsi = smContext.Supi
kafkaSmCtxt.IPAddress = smContext.PDUAddress.Ip.String()
if smContext.PDUAddress.Ip != nil {
kafkaSmCtxt.IPAddress = smContext.PDUAddress.Ip.String()
thakurajayL marked this conversation as resolved.
Show resolved Hide resolved
}
kafkaSmCtxt.SmfSubState, op = mapPduSessStateToMetricStateAndOp(smContext.SMContextState)
kafkaSmCtxt.SmfId = smContext.Ref
kafkaSmCtxt.Slice = "sd:" + smContext.Snssai.Sd + " sst:" + strconv.Itoa(int(smContext.Snssai.Sst))
Expand Down
4 changes: 2 additions & 2 deletions pdusession/api_individual_sm_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (

// HTTPReleaseSmContext - Release SM Context
func HTTPReleaseSmContext(c *gin.Context) {
logger.PduSessLog.Info("Recieve Release SM Context Request")
logger.PduSessLog.Info("Receive Release SM Context Request")
stats.IncrementN11MsgStats(smf_context.SMF_Self().NfInstanceID, string(svcmsgtypes.ReleaseSmContext), "In", "", "")
stats.PublishMsgEvent(mi.Smf_msg_type_pdu_sess_release_req)

Expand Down Expand Up @@ -87,7 +87,7 @@ func RetrieveSmContext(c *gin.Context) {

// HTTPUpdateSmContext - Update SM Context
func HTTPUpdateSmContext(c *gin.Context) {
logger.PduSessLog.Info("Recieve Update SM Context Request")
logger.PduSessLog.Info("Receive Update SM Context Request")
stats.IncrementN11MsgStats(smf_context.SMF_Self().NfInstanceID, string(svcmsgtypes.UpdateSmContext), "In", "", "")
stats.PublishMsgEvent(mi.Smf_msg_type_pdu_sess_update_req)

Expand Down
2 changes: 1 addition & 1 deletion pdusession/api_sm_contexts_collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (

// HTTPPostSmContexts - Create SM Context
func HTTPPostSmContexts(c *gin.Context) {
logger.PduSessLog.Info("Recieve Create SM Context Request")
logger.PduSessLog.Info("Receive Create SM Context Request")
var request models.PostSmContextsRequest
stats.IncrementN11MsgStats(smf_context.SMF_Self().NfInstanceID, string(svcmsgtypes.CreateSmContext), "In", "", "")
stats.PublishMsgEvent(mi.Smf_msg_type_pdu_sess_create_req)
Expand Down
Loading