diff options
| author | Rusty Wagner <rusty@vector35.com> | 2015-11-02 23:10:07 -0500 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2015-11-02 23:10:07 -0500 |
| commit | 0f6f924f277084429029ba69907d7d51770476e4 (patch) | |
| tree | fbfa9be1f234087a766bc4cb6d93a049c43022e7 /update.cpp | |
| parent | 72dba52eb3d90abae437e4658700167f47a05cf5 (diff) | |
Don't allow update to be aborted in critical path, and fixes for updating after manually overwriting a build
Diffstat (limited to 'update.cpp')
| -rw-r--r-- | update.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -8,12 +8,12 @@ namespace BinaryNinja { struct UpdateProgress { - function<void(uint64_t progress, uint64_t total)> func; + function<bool(uint64_t progress, uint64_t total)> func; - static void UpdateCallback(void* ctxt, uint64_t progress, uint64_t total) + static bool UpdateCallback(void* ctxt, uint64_t progress, uint64_t total) { UpdateProgress* self = (UpdateProgress*)ctxt; - self->func(progress, total); + return self->func(progress, total); } }; } @@ -65,12 +65,12 @@ bool UpdateChannel::AreUpdatesAvailable() BNUpdateResult UpdateChannel::UpdateToVersion(const string& version) { - return UpdateToVersion(version, [](uint64_t, uint64_t){}); + return UpdateToVersion(version, [](uint64_t, uint64_t){ return true; }); } BNUpdateResult UpdateChannel::UpdateToVersion(const string& version, - const function<void(uint64_t progress, uint64_t total)>& progress) + const function<bool(uint64_t progress, uint64_t total)>& progress) { UpdateProgress up; up.func = progress; @@ -92,11 +92,11 @@ BNUpdateResult UpdateChannel::UpdateToVersion(const string& version, BNUpdateResult UpdateChannel::UpdateToLatestVersion() { - return UpdateToLatestVersion([](uint64_t, uint64_t){}); + return UpdateToLatestVersion([](uint64_t, uint64_t){ return true; }); } -BNUpdateResult UpdateChannel::UpdateToLatestVersion(const function<void(uint64_t progress, uint64_t total)>& progress) +BNUpdateResult UpdateChannel::UpdateToLatestVersion(const function<bool(uint64_t progress, uint64_t total)>& progress) { UpdateProgress up; up.func = progress; |
