Age | Commit message (Collapse) | Author |
|
To detect if an active translator goes away, we need to register for
dead name notifications. Those notifications have to be sent to a port
known to the ports library, as the ports library handles the dead name
notifications. The most straight forward way is to use the port to the
underlying node for that. To that end, a reference to the port_info
struct is handed in and kept in the list of active translators.
This commit also moves the registration of dead name notifications to
libfshelp.
* libfshelp/fshelp.h (fshelp_set_active_translator): Add port_info argument.
* libfshelp/translator-list.c (struct translator): Add port_info pointer.
(translator_ihash_cleanup): Dereference port_info object.
(fshelp_set_active_translator): Register dead name notifications.
* libdiskfs/file-set-trans.c (diskfs_S_file_set_translator): Update
accordingly.
* libnetfs/file-set-translator.c (netfs_S_file_set_translator): Likewise.
|
|
Previously the dynamically allocated field name leaks. Fix this by
properly freeing the objects of type struct translator.
* libfshelp/translator-list.c (translator_ihash_cleanup): Fix memory leak.
|
|
* libfshelp/translator-list.c: Include <libgen.h> to get `dirname' prototype.
|
|
Add functions that maintain a list of active translators.
* libfshelp/translator-list.c: New file.
* libfshelp/fshelp.h: Add function declarations.
* libfshelp/Makefile: Add translator-list.c, link against libihash.
|