From 563db580aea58769b9410b687dcfe038dcefce60 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 29 Nov 2014 23:35:18 +0100 Subject: [PATCH] fs/Charset: add DeinitFSCharset() --- src/Main.cxx | 2 ++ src/fs/Charset.cxx | 5 +++++ src/fs/Charset.hxx | 3 +++ src/fs/Config.cxx | 8 ++++++++ src/fs/Config.hxx | 3 +++ 5 files changed, 21 insertions(+) diff --git a/src/Main.cxx b/src/Main.cxx index 418e69644..b31c51b4d 100644 --- a/src/Main.cxx +++ b/src/Main.cxx @@ -722,6 +722,8 @@ static int mpd_main_after_fork(struct options options) mapper_finish(); #endif + DeinitFS(); + delete instance->partition; command_finish(); decoder_plugin_deinit_all(); diff --git a/src/fs/Charset.cxx b/src/fs/Charset.cxx index 9471d97f8..065ba9a12 100644 --- a/src/fs/Charset.cxx +++ b/src/fs/Charset.cxx @@ -88,6 +88,11 @@ SetFSCharset(const char *charset, Error &error) #endif +void +DeinitFSCharset() +{ +} + const char * GetFSCharset() { diff --git a/src/fs/Charset.hxx b/src/fs/Charset.hxx index 102fa2536..7a5193576 100644 --- a/src/fs/Charset.hxx +++ b/src/fs/Charset.hxx @@ -41,6 +41,9 @@ GetFSCharset(); bool SetFSCharset(const char *charset, Error &error); +void +DeinitFSCharset(); + /** * Convert the path to UTF-8. * Returns empty string on error. diff --git a/src/fs/Config.cxx b/src/fs/Config.cxx index 972365289..cb7e86e09 100644 --- a/src/fs/Config.cxx +++ b/src/fs/Config.cxx @@ -61,3 +61,11 @@ ConfigureFS(Error &error) return true; #endif } + +void +DeinitFS() +{ +#ifdef HAVE_FS_CHARSET + DeinitFSCharset(); +#endif +} diff --git a/src/fs/Config.hxx b/src/fs/Config.hxx index d2cde4a66..403c07685 100644 --- a/src/fs/Config.hxx +++ b/src/fs/Config.hxx @@ -30,4 +30,7 @@ class Error; bool ConfigureFS(Error &error); +void +DeinitFS(); + #endif