summaryrefslogtreecommitdiff
path: root/obexd
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2013-08-08 16:41:14 +0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2013-08-12 13:48:09 +0300
commitfeb46c1d38da86c9001f1642e50ee70ff209ccee (patch)
tree8f70ab5f988b6f138295a9d5e7d94a18ebde8df6 /obexd
parent0c6df3bb9b16dd31f75ed35f29cf4dda8ae080b4 (diff)
client/transfer: Add proper message to errors
This improve the error message when a transfer fails by using g_obex_strerror to decode the response code to a human readable string.
Diffstat (limited to 'obexd')
-rw-r--r--obexd/client/transfer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/obexd/client/transfer.c b/obexd/client/transfer.c
index 4b1def3ca..2e8f7c76c 100644
--- a/obexd/client/transfer.c
+++ b/obexd/client/transfer.c
@@ -596,8 +596,8 @@ static void get_xfer_progress_first(GObex *obex, GError *err, GObexPacket *rsp,
rspcode = g_obex_packet_get_operation(rsp, &final);
if (rspcode != G_OBEX_RSP_SUCCESS && rspcode != G_OBEX_RSP_CONTINUE) {
- err = g_error_new(OBC_TRANSFER_ERROR, rspcode,
- "Transfer failed (0x%02x)", rspcode);
+ err = g_error_new(OBC_TRANSFER_ERROR, rspcode, "%s",
+ g_obex_strerror(rspcode));
xfer_complete(obex, err, transfer);
g_error_free(err);
return;