[Spice-devel] [spice-xpi PATCHv2 02/12] Use gio to write trust store
Marc-André Lureau
marcandre.lureau at gmail.com
Wed Mar 13 05:50:30 PDT 2013
On Wed, Mar 13, 2013 at 11:15 AM, Christophe Fergeau
<cfergeau at redhat.com> wrote:
> + tmp_file = g_file_new_tmp("trustore.pem-XXXXXX", &iostream, NULL);
> + if (tmp_file == NULL) {
> + g_message("Couldn't create truststore");
> + return false;
> }
> - else
> - {
> - g_critical("could not create truststore temp file: %s", g_strerror(errno));
> +
> + stream = g_io_stream_get_output_stream(G_IO_STREAM(iostream));
> + if (!g_output_stream_write_all(stream,
> + trust_store.c_str(),
> + trust_store.length(),
> + NULL, NULL, NULL)) {
> + g_message("Couldn't write truststore");
g_message() might be filtered out by default. g_warning or g_critical
was more appropriate.
--
Marc-André Lureau
More information about the Spice-devel
mailing list