X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=backend%2Ffiles%2Fgiochannel.c;h=dde0c5601cc044879d31b8d08198708a86c3b757;hb=28f92055c4f63c94fea145871f1dab5bb56c0240;hp=e8a4bb783f53045e2de8bf6fe7340319deb30a34;hpb=dbd671fee3ebb38850bd0e09f9eb25bbc2c76ea1;p=cascardo%2Fatompub.git diff --git a/backend/files/giochannel.c b/backend/files/giochannel.c index e8a4bb7..dde0c56 100644 --- a/backend/files/giochannel.c +++ b/backend/files/giochannel.c @@ -19,6 +19,7 @@ #include #include +#include static gchar * giochannel_iri_to_filename (AtomCtx *ctx, IRI *iri) @@ -44,15 +45,19 @@ giochannel_atom_retrieve_resource (AtomCtx *ctx, IRI *iri) g_free (filename); if (channel == NULL) { - atom_error_set (ctx, error); + AtomError *aerr = atom_error_new_from_gerror (error); + atom_error_set (ctx, aerr); + g_error_free (error); return NULL; } error = NULL; if (g_io_channel_read_to_end (channel, &data, &len, &error) != G_IO_STATUS_NORMAL) { + AtomError *aerr = atom_error_new_from_gerror (error); g_io_channel_unref (channel); - atom_error_set (ctx, error); + atom_error_set (ctx, aerr); + g_error_free (error); return NULL; } g_io_channel_unref (channel);