Re: [spice-xpi PATCHv2 02/12] Use gio to write trust store

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 13, 2013 at 11:15 AM, Christophe Fergeau
<cfergeau@xxxxxxxxxx> 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
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]