diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2011-08-09 20:00:18 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-08-09 20:00:18 -0700 |
commit | 4dc66b9cb0ee809c1dd4c66640878a232aacf22d (patch) | |
tree | d24270a9f13f449beea556c497ea1eae8e576fd0 /gatchat | |
parent | 6351cb1e4e102b3a3429e72f5322ea06daf6cc9e (diff) | |
download | ofono-4dc66b9cb0ee809c1dd4c66640878a232aacf22d.tar.bz2 |
gatchat: Abort hexdump helper when no debug function is specified
Diffstat (limited to 'gatchat')
-rw-r--r-- | gatchat/gatutil.c | 3 |
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++) { |