File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -181,10 +181,20 @@ func HandleDeregAcceptEvent(ue *simuectx.SimUe,
181
181
return nil
182
182
}
183
183
184
- func HandlePduSessEstRequestEvent (ue * simuectx.SimUe ,
185
- intfcMsg common.InterfaceMessage ,
186
- ) (err error ) {
187
- msg := intfcMsg .(* common.UuMessage )
184
+ func HandlePduSessEstRequestEvent (ue * simuectx.SimUe , intfcMsg common.InterfaceMessage ) (err error ) {
185
+ // Safe type assertions
186
+ if intfcMsg == nil {
187
+ err := fmt .Errorf ("HandlePduSessEstRequestEvent: intfcMsg is nil" )
188
+ ue .Log .Errorln (err )
189
+ return err
190
+ }
191
+
192
+ msg , ok := intfcMsg .(* common.UuMessage )
193
+ if ! ok {
194
+ err := fmt .Errorf ("HandlePduSessEstRequestEvent: expected *common.UuMessage, got %T" , intfcMsg )
195
+ ue .Log .Errorln (err )
196
+ return err
197
+ }
188
198
msg .Event = common .UL_INFO_TRANSFER_EVENT
189
199
SendToGnbUe (ue , msg )
190
200
return nil
You can’t perform that action at this time.
0 commit comments