1.1 --- a/libnotifier/lib/src/notifier.cc Wed Mar 22 16:14:29 2023 +0100
1.2 +++ b/libnotifier/lib/src/notifier.cc Wed Mar 22 16:15:04 2023 +0100
1.3 @@ -81,6 +81,12 @@
1.4
1.5 ObjectNotifier::~ObjectNotifier()
1.6 {
1.7 + ServerConfigs::iterator it;
1.8 +
1.9 + for (it = _configs.begin(); it != _configs.end(); it++)
1.10 + delete *it;
1.11 +
1.12 + _configs.clear();
1.13 }
1.14
1.15
1.16 @@ -102,7 +108,7 @@
1.17 if (err)
1.18 return err;
1.19
1.20 - _config = server.config();
1.21 + _configs.push_back(server.config());
1.22 _started = true;
1.23
1.24 return L4_EOK;
1.25 @@ -146,11 +152,12 @@
1.26
1.27 NotifierResource *resource = new NotifierResource(this, object);
1.28 ResourceServer server(resource);
1.29 - long err = server.start_in_thread(_config->thread, false);
1.30 + long err = server.start_in_thread(_configs.front()->thread, false);
1.31
1.32 if (err)
1.33 return err;
1.34
1.35 + _configs.push_back(server.config());
1.36 state.endpoint = server.config()->server;
1.37 }
1.38
1.39 @@ -204,9 +211,7 @@
1.40
1.41
1.42
1.43 -/* Handle a notification event for an object. Ideally, this would be invoked by
1.44 - the generic server dispatch mechanism, with the gate label being interpreted
1.45 - and provided as the first parameter. */
1.46 +/* Handle a notification event for an object. */
1.47
1.48 void GeneralObjectNotifier::notify(notifiable_t *object, notify_flags_t flags,
1.49 notify_values_t values)