1.1 --- a/libfsclient/lib/src/file.cc Wed Mar 29 00:32:20 2023 +0200
1.2 +++ b/libfsclient/lib/src/file.cc Mon Apr 03 00:35:34 2023 +0200
1.3 @@ -96,6 +96,7 @@
1.4
1.5 file->notifiable.notifications = 0;
1.6 file->notifiable.base = (notifiable_base_t *) file;
1.7 + file->notifiable.handler = NULL;
1.8 }
1.9
1.10
1.11 @@ -634,7 +635,6 @@
1.12
1.13 void file_notify_close(file_notifier_t *notifier)
1.14 {
1.15 - notifier->obj->stop();
1.16 delete notifier->obj;
1.17 delete notifier;
1.18 }
1.19 @@ -677,8 +677,7 @@
1.20
1.21 long file_notify_wait_file(file_t *file, file_notifier_t *notifier)
1.22 {
1.23 - SpecificObjectNotifier *specific_notifier = dynamic_cast<SpecificObjectNotifier *>(notifier->obj);
1.24 - long err = specific_notifier->wait_object(file_notifiable(file));
1.25 + long err = notifier->obj->wait_object(file_notifiable(file));
1.26
1.27 /* Unsubscribe if a closure notification has been received. */
1.28
1.29 @@ -692,9 +691,8 @@
1.30
1.31 long file_notify_wait_files(file_t **file, file_notifier_t *notifier)
1.32 {
1.33 - GeneralObjectNotifier *general_notifier = dynamic_cast<GeneralObjectNotifier *>(notifier->obj);
1.34 notifiable_t *notifiable;
1.35 - long err = general_notifier->wait(¬ifiable);
1.36 + long err = notifier->obj->wait(¬ifiable);
1.37
1.38 *file = (file_t *) notifiable->base;
1.39