You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by jf...@apache.org on 2020/10/07 08:56:13 UTC

[plc4x] branch rel/0.6 updated: Fixed Bug in S7 Driver which always uses 0/0 as rack / slot hardcoded. Thanks to Tim for the fix!

This is an automated email from the ASF dual-hosted git repository.

jfeinauer pushed a commit to branch rel/0.6
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/rel/0.6 by this push:
     new 86d783b  Fixed Bug in S7 Driver which always uses 0/0 as rack / slot hardcoded. Thanks to Tim for the fix!
86d783b is described below

commit 86d783bd6a968d528b8ff18134f662f8eb5ff5be
Author: Julian Feinauer <j....@pragmaticminds.de>
AuthorDate: Wed Oct 7 10:55:55 2020 +0200

    Fixed Bug in S7 Driver which always uses 0/0 as rack / slot hardcoded. Thanks to Tim for the fix!
---
 .../main/java/org/apache/plc4x/java/s7/connection/S7PlcConnection.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/connection/S7PlcConnection.java b/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/connection/S7PlcConnection.java
index b528f1d..34ddfa0 100644
--- a/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/connection/S7PlcConnection.java
+++ b/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/connection/S7PlcConnection.java
@@ -170,7 +170,7 @@ public class S7PlcConnection extends NettyPlcConnection implements PlcReader, Pl
 
     @Override
     protected ChannelHandler getChannelHandler(CompletableFuture<Void> sessionSetupCompleteFuture) {
-        short calledTsapId = S7TsapIdEncoder.encodeS7TsapId(DeviceGroup.OS, 0, 0);
+        short calledTsapId = S7TsapIdEncoder.encodeS7TsapId(DeviceGroup.OS, rack, slot);
         short callingTsapId = S7TsapIdEncoder.encodeS7TsapId(DeviceGroup.PG_OR_PC, rack, slot);
 
         return new ChannelInitializer() {