StorageCommands: emit IDLE_MOUNT on successful "mount"

Add the new idle event to Idle.hxx/Idle.cxx.
This commit is contained in:
Max Kellermann 2014-02-12 21:46:16 +01:00
parent 0935ae330a
commit ace4ba3171
3 changed files with 6 additions and 0 deletions

View File

@ -46,6 +46,7 @@ static const char *const idle_names[] = {
"subscription",
"message",
"neighbor",
"mount",
nullptr
};

View File

@ -64,6 +64,9 @@ static constexpr unsigned IDLE_MESSAGE = 0x400;
/** a neighbor was found or lost */
static constexpr unsigned IDLE_NEIGHBOR = 0x800;
/** the mount list has changed */
static constexpr unsigned IDLE_MOUNT = 0x1000;
/**
* Adds idle flag (with bitwise "or") and queues notifications to all
* clients.

View File

@ -29,6 +29,7 @@
#include "Instance.hxx"
#include "storage/Registry.hxx"
#include "storage/CompositeStorage.hxx"
#include "Idle.hxx"
static void
print_storage_uri(Client &client, const Storage &storage)
@ -109,5 +110,6 @@ handle_mount(Client &client, gcc_unused int argc, char *argv[])
}
composite.Mount(local_uri, storage);
idle_add(IDLE_MOUNT);
return CommandResult::OK;
}