summaryrefslogtreecommitdiff
path: root/src/interpreter.rs
diff options
context:
space:
mode:
authorShaun Taheri <shaun@advancedtelematic.com>2016-09-08 14:55:33 +0200
committerShaun Taheri <shaun@advancedtelematic.com>2016-09-08 15:39:23 +0200
commit5b69a479dd4ebf6f8c6fddb3ef48823b59bb0a17 (patch)
tree3587b057ebb1f40c0e5ecd2fb75b58197e8a65b1 /src/interpreter.rs
parent56a59856ff89195aff896242048a50ddc47a423c (diff)
downloadrvi_sota_client-5b69a479dd4ebf6f8c6fddb3ef48823b59bb0a17.tar.gz
Send an UpdateReport after a DownloadFailed Event
Diffstat (limited to 'src/interpreter.rs')
-rw-r--r--src/interpreter.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/interpreter.rs b/src/interpreter.rs
index 9797456..c009d3c 100644
--- a/src/interpreter.rs
+++ b/src/interpreter.rs
@@ -79,6 +79,11 @@ impl Interpreter<Event, Command> for EventInterpreter {
}
}
+ Event::DownloadFailed(id, reason) => {
+ let report = UpdateReport::single(id, UpdateResultCode::GENERAL_ERROR, reason);
+ ctx.send(Command::SendUpdateReport(report));
+ }
+
Event::InstallComplete(report) | Event::InstallFailed(report) => {
ctx.send(Command::SendUpdateReport(report));
}