Commit ea8e55dbabd9c6840a4d8e4d09a8d285b2e0bae5
1 parent
04657813
Set downlink msg id in the response msg
Showing
1 changed file
with
6 additions
and
2 deletions
@@ -136,7 +136,9 @@ public class EdgeImitator { | @@ -136,7 +136,9 @@ public class EdgeImitator { | ||
136 | @Override | 136 | @Override |
137 | public void onSuccess(@Nullable List<Void> result) { | 137 | public void onSuccess(@Nullable List<Void> result) { |
138 | if (connected) { | 138 | if (connected) { |
139 | - DownlinkResponseMsg downlinkResponseMsg = DownlinkResponseMsg.newBuilder().setSuccess(true).build(); | 139 | + DownlinkResponseMsg downlinkResponseMsg = DownlinkResponseMsg.newBuilder() |
140 | + .setDownlinkMsgId(downlinkMsg.getDownlinkMsgId()) | ||
141 | + .setSuccess(true).build(); | ||
140 | edgeRpcClient.sendDownlinkResponseMsg(downlinkResponseMsg); | 142 | edgeRpcClient.sendDownlinkResponseMsg(downlinkResponseMsg); |
141 | } | 143 | } |
142 | } | 144 | } |
@@ -144,7 +146,9 @@ public class EdgeImitator { | @@ -144,7 +146,9 @@ public class EdgeImitator { | ||
144 | @Override | 146 | @Override |
145 | public void onFailure(Throwable t) { | 147 | public void onFailure(Throwable t) { |
146 | if (connected) { | 148 | if (connected) { |
147 | - DownlinkResponseMsg downlinkResponseMsg = DownlinkResponseMsg.newBuilder().setSuccess(false).setErrorMsg(t.getMessage()).build(); | 149 | + DownlinkResponseMsg downlinkResponseMsg = DownlinkResponseMsg.newBuilder() |
150 | + .setDownlinkMsgId(downlinkMsg.getDownlinkMsgId()) | ||
151 | + .setSuccess(false).setErrorMsg(t.getMessage()).build(); | ||
148 | edgeRpcClient.sendDownlinkResponseMsg(downlinkResponseMsg); | 152 | edgeRpcClient.sendDownlinkResponseMsg(downlinkResponseMsg); |
149 | } | 153 | } |
150 | } | 154 | } |