Make boot_uuid change in event loops when it changes
We were seeing any event loops created before the UUID changes staying
the same. This defeats the purpose. This is especially true for the
simulated network bridge which uses an event loop to get the boot UUID,
and wants to observe when it changes.
The boot UUID shouldn't change in any other conditions, so this won't
have an effect on anything else.
Change-Id: Idfa8f36e8d0e4ba964d09bf2170cbbffb17b8276
diff --git a/aos/events/event_loop.h b/aos/events/event_loop.h
index 3916ce4..0534242 100644
--- a/aos/events/event_loop.h
+++ b/aos/events/event_loop.h
@@ -474,7 +474,7 @@
class EventLoop {
public:
- EventLoop(const Configuration *configuration, UUID boot_uuid);
+ EventLoop(const Configuration *configuration);
virtual ~EventLoop();
@@ -655,7 +655,7 @@
virtual int NumberBuffers(const Channel *channel) = 0;
// Returns the boot UUID.
- const UUID &boot_uuid() { return boot_uuid_; }
+ virtual const UUID &boot_uuid() const = 0;
protected:
// Sets the name of the event loop. This is the application name.
@@ -736,8 +736,6 @@
// If true, don't send AOS_LOG to /aos
bool skip_logger_ = false;
- UUID boot_uuid_;
-
private:
virtual pid_t GetTid() = 0;