firmware: return failure on attempt to open active files

Currently, the codebase does not support opening the active files,
therefore the code needs to return failure in those two cases.  The case
regarding opening an active file:

1) You've started uploading, stopped, closed the file.
2) Decided to start again, opened the active file directly.

There is no need to support opening the active file until later.

Change-Id: I719a79fe639dbcb752ad60d03900244b35729e20
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/firmware_handler.cpp b/firmware_handler.cpp
index 31d7565..9b4e7b0 100644
--- a/firmware_handler.cpp
+++ b/firmware_handler.cpp
@@ -208,12 +208,14 @@
         /* 2a) are they opening the active image? this can only happen if they
          * already started one (due to canHandleBlob's behavior).
          */
+        return false;
     }
     else if (path == activeHashBlobID)
     {
         /* 2b) are they opening the active hash? this can only happen if they
          * already started one (due to canHandleBlob's behavior).
          */
+        return false;
     }
 
     /* How are they expecting to copy this data? */
@@ -232,10 +234,10 @@
 
     if (path == hashBlobID)
     {
-        curr = &activeHash;
-
         /* 2c) are they opening the /flash/hash ? (to start the process) */
 
+        curr = &activeHash;
+
         /* Add active hash blob_id to canHandle list. */
         blobIDs.push_back(activeHashBlobID);
     }
@@ -251,7 +253,6 @@
      * 2e) are they opening the /flash/image ? (to start the process)
      * 2...) are they opening the /flash/... ? (to start the process)
      */
-
     auto h = std::find_if(
         handlers.begin(), handlers.end(),
         [&path](const auto& iter) { return (iter.blobName == path); });