summaryrefslogtreecommitdiffstats
path: root/gatchat
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2011-08-09 20:00:18 -0700
committerMarcel Holtmann <marcel@holtmann.org>2011-08-09 20:00:18 -0700
commit4dc66b9cb0ee809c1dd4c66640878a232aacf22d (patch)
treed24270a9f13f449beea556c497ea1eae8e576fd0 /gatchat
parent6351cb1e4e102b3a3429e72f5322ea06daf6cc9e (diff)
downloadofono-4dc66b9cb0ee809c1dd4c66640878a232aacf22d.tar.bz2
gatchat: Abort hexdump helper when no debug function is specified
Diffstat (limited to 'gatchat')
-rw-r--r--gatchat/gatutil.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gatchat/gatutil.c b/gatchat/gatutil.c
index 768490b2..6a7bb4b6 100644
--- a/gatchat/gatutil.c
+++ b/gatchat/gatutil.c
@@ -140,6 +140,9 @@ void g_at_util_debug_hexdump(gboolean in, const unsigned char *buf, gsize len,
char str[68];
gsize i;
+ if (debugf == NULL || !len)
+ return;
+
str[0] = in ? '<' : '>';
for (i = 0; i < len; i++) {