summaryrefslogtreecommitdiff
path: root/gobex/gobex-packet.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2011-10-21 13:34:00 +0300
committerMarcel Holtmann <marcel@holtmann.org>2012-12-04 22:22:03 +0100
commitfffdbad4a8343fd23fbee76236562a57a8533fa5 (patch)
tree7200f8de86f972b3549cd3c9bbf3366831982ba9 /gobex/gobex-packet.c
parent54da6b6ad2b73818769bcf22bb9c4f5cd5c50bd4 (diff)
downloadbluez-fffdbad4a8343fd23fbee76236562a57a8533fa5.tar.gz
gobex: log errors using G_OBEX_DEBUG_ERROR
Diffstat (limited to 'gobex/gobex-packet.c')
-rw-r--r--gobex/gobex-packet.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gobex/gobex-packet.c b/gobex/gobex-packet.c
index de5a1a8c7..c7d9e381e 100644
--- a/gobex/gobex-packet.c
+++ b/gobex/gobex-packet.c
@@ -28,6 +28,7 @@
#include "gobex-defs.h"
#include "gobex-packet.h"
+#include "gobex-debug.h"
#define FINAL_BIT 0x80
@@ -291,12 +292,14 @@ GObexPacket *g_obex_packet_decode(const void *data, gsize len,
if (data_policy == G_OBEX_DATA_INHERIT) {
g_set_error(err, G_OBEX_ERROR, G_OBEX_ERROR_INVALID_ARGS,
"Invalid data policy");
+ g_obex_debug(G_OBEX_DEBUG_ERROR, "%s", (*err)->message);
return NULL;
}
if (len < 3 + header_offset) {
g_set_error(err, G_OBEX_ERROR, G_OBEX_ERROR_PARSE_ERROR,
"Not enough data to decode packet");
+ g_obex_debug(G_OBEX_DEBUG_ERROR, "%s", (*err)->message);
return NULL;
}
@@ -308,6 +311,7 @@ GObexPacket *g_obex_packet_decode(const void *data, gsize len,
g_set_error(err, G_OBEX_ERROR, G_OBEX_ERROR_PARSE_ERROR,
"Incorrect packet length (%u != %zu)",
packet_len, len);
+ g_obex_debug(G_OBEX_DEBUG_ERROR, "%s", (*err)->message);
return NULL;
}