[empathy: 1/2] Correctly propagate Provide/Accept errors
- From: Will Thompson <wjt src gnome org>
- To: svn-commits-list gnome org
- Subject: [empathy: 1/2] Correctly propagate Provide/Accept errors
- Date: Tue, 9 Jun 2009 14:09:24 -0400 (EDT)
commit f31d0fbeda0c03a619c2db2a84ef3181c579649b
Author: Will Thompson <will thompson collabora co uk>
Date: Tue Jun 9 18:34:35 2009 +0100
Correctly propagate Provide/Accept errors
Previously, if myerr was set as well as error, myerr was cleared, but
not set to a copy of error. So then the function continued as normal,
and crashed.
Also, having checked if myerr is set, we should probably log the message
from that, rather than from the (possibly NULL) error. :)
---
libempathy/empathy-tp-file.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/libempathy/empathy-tp-file.c b/libempathy/empathy-tp-file.c
index 3a58268..8b9b9a5 100644
--- a/libempathy/empathy-tp-file.c
+++ b/libempathy/empathy-tp-file.c
@@ -407,13 +407,14 @@ ft_operation_provide_or_accept_file_cb (TpChannel *proxy,
* report the method error.
*/
g_clear_error (&myerr);
- myerr = g_error_copy (error);
}
+
+ myerr = g_error_copy (error);
}
if (myerr != NULL)
{
- DEBUG ("Error: %s", error->message);
+ DEBUG ("Error: %s", myerr->message);
ft_operation_close_with_error (tp_file, myerr);
g_clear_error (&myerr);
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]