diff options
author | John Emmas <johne53@tiscali.co.uk> | 2015-09-08 15:38:17 +0100 |
---|---|---|
committer | John Emmas <johne53@tiscali.co.uk> | 2015-09-08 15:45:33 +0100 |
commit | d0fdcf2848f9196404f9a8e7e4f16a3cb931e4a2 (patch) | |
tree | 6f0fad69778cdf61eccb8e1eac2c234d28bf71db /gtk2_ardour/pingback.cc | |
parent | d11b15fbca760049cf9c2f0bdf58ecd3d66ee6fb (diff) |
Use glib to open our 'announcements' file, rather than opening directly with ofstream
(on Windows, std::ofstream doesn't support UTF8)
Diffstat (limited to 'gtk2_ardour/pingback.cc')
-rw-r--r-- | gtk2_ardour/pingback.cc | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/gtk2_ardour/pingback.cc b/gtk2_ardour/pingback.cc index 3c46a0c8ff..10c798e104 100644 --- a/gtk2_ardour/pingback.cc +++ b/gtk2_ardour/pingback.cc @@ -32,6 +32,7 @@ #include <curl/curl.h> +#include <glib/gstdio.h> #include <glibmm/miscutils.h> #include "pbd/compose.h" @@ -221,11 +222,19 @@ _pingback (void *arg) //write announcements to local file, even if the //announcement is empty - - std::ofstream annc_file (cm->announce_path.c_str()); - - if (annc_file) { - annc_file << return_str; + + FILE* fout = g_fopen (cm->announce_path.c_str(), "wb"); + + if (fout) { + { + std::ofstream annc_file (fout); + + if (annc_file) { + annc_file << return_str; + } + } + + fclose (fout); } } } else { |