Skip to content

Commit

Permalink
Fix golang compile errors.
Browse files Browse the repository at this point in the history
Signed-off-by: Łukasz Dywicki <[email protected]>
  • Loading branch information
splatch committed Feb 11, 2024
1 parent 228f8f5 commit 362a99a
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 99 deletions.
2 changes: 1 addition & 1 deletion plc4go/internal/opcua/Driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func (d *Driver) GetConnectionWithContext(ctx context.Context, transportUrl url.
portAddition += ":" + transportPort
}
configuration.endpoint = "opc." + transportCode + "://" + transportHost + portAddition + "" + transportEndpoint
d.log.Debug().Stringer("configuration", &configuration).Msg("working with configurartion")
d.log.Debug().Stringer("configuration", &configuration).Msg("working with configuration")

if securityPolicy := configuration.securityPolicy; securityPolicy != "" && securityPolicy != "None" {
d.log.Trace().Str("securityPolicy", securityPolicy).Msg("working with security policy")
Expand Down
4 changes: 2 additions & 2 deletions plc4go/internal/opcua/EncryptionHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ func (h *EncryptionHandler) decodeMessage(ctx context.Context, pdu readWriteMode
var message []byte
switch pduMessage := pdu.GetMessage().(type) {
case readWriteModel.OpcuaOpenResponseExactly:
message = pduMessage.GetMessage()
message = pduMessage.(readWriteModel.BinaryPayloadExactly).GetPayload()
case readWriteModel.OpcuaMessageResponseExactly:
message = pduMessage.GetMessage()
message = pduMessage.(readWriteModel.BinaryPayloadExactly).GetPayload()
default:
h.log.Trace().Type("pdu", pdu).Msg("unhandled type")
return pdu, nil
Expand Down
Loading

0 comments on commit 362a99a

Please sign in to comment.