StorageCommands: emit IDLE_MOUNT on successful "mount"
Add the new idle event to Idle.hxx/Idle.cxx.
This commit is contained in:
parent
0935ae330a
commit
ace4ba3171
@ -46,6 +46,7 @@ static const char *const idle_names[] = {
|
|||||||
"subscription",
|
"subscription",
|
||||||
"message",
|
"message",
|
||||||
"neighbor",
|
"neighbor",
|
||||||
|
"mount",
|
||||||
nullptr
|
nullptr
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -64,6 +64,9 @@ static constexpr unsigned IDLE_MESSAGE = 0x400;
|
|||||||
/** a neighbor was found or lost */
|
/** a neighbor was found or lost */
|
||||||
static constexpr unsigned IDLE_NEIGHBOR = 0x800;
|
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
|
* Adds idle flag (with bitwise "or") and queues notifications to all
|
||||||
* clients.
|
* clients.
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include "Instance.hxx"
|
#include "Instance.hxx"
|
||||||
#include "storage/Registry.hxx"
|
#include "storage/Registry.hxx"
|
||||||
#include "storage/CompositeStorage.hxx"
|
#include "storage/CompositeStorage.hxx"
|
||||||
|
#include "Idle.hxx"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_storage_uri(Client &client, const Storage &storage)
|
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);
|
composite.Mount(local_uri, storage);
|
||||||
|
idle_add(IDLE_MOUNT);
|
||||||
return CommandResult::OK;
|
return CommandResult::OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user