Commit ace4ba31 authored by Max Kellermann's avatar Max Kellermann

StorageCommands: emit IDLE_MOUNT on successful "mount"

Add the new idle event to Idle.hxx/Idle.cxx.
parent 0935ae33
......@@ -46,6 +46,7 @@ static const char *const idle_names[] = {
"subscription",
"message",
"neighbor",
"mount",
nullptr
};
......
......@@ -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.
......
......@@ -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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment