[Telepathy-commits] [telepathy-mission-control/master] Construct the proper GError when a request fails.

Alberto Mardegan alberto.mardegan at nokia.com
Fri Feb 27 01:47:40 PST 2009


---
 libmcclient/mc-account-request.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/libmcclient/mc-account-request.c b/libmcclient/mc-account-request.c
index 1c75065..1cfe566 100644
--- a/libmcclient/mc-account-request.c
+++ b/libmcclient/mc-account-request.c
@@ -154,9 +154,8 @@ on_request_failed (TpProxy *proxy, const gchar *request_path,
     req = REQUEST_FROM_ID (id);
     if (G_UNLIKELY (!req)) return;
 
-    /* FIXME: map the error properly */
-    req->error = g_error_new (MC_ERROR, MC_CHANNEL_REQUEST_GENERIC_ERROR,
-                              error_message);
+    tp_proxy_dbus_error_to_gerror (proxy, error_name, error_message,
+                                   &req->error);
     emit_request_event (req, MC_ACCOUNT_CR_FAILED);
 }
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list