From 61fad487bace7114a9308db7106085ac128bbda1 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Sat, 8 Nov 2008 17:09:37 +0000 Subject: [PATCH] trivial: try harder to not print invalid ASCII codes --- src/dkp-wup.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/dkp-wup.c b/src/dkp-wup.c index c09e37f..498c6b7 100644 --- a/src/dkp-wup.c +++ b/src/dkp-wup.c @@ -274,6 +274,8 @@ dkp_wup_parse_command (DkpWup *wup, const gchar *data) /* replace the first ';' char with a NULL if it exists */ length = strlen (packet); for (i=0; i 0x7e) + packet[i] = '?'; if (packet[i] == ';') { packet[i] = '\0'; break; @@ -326,14 +328,6 @@ dkp_wup_parse_command (DkpWup *wup, const gchar *data) goto out; } -#if 0 - /* print the data */ - egg_debug ("command=%c:%c", command, subcommand); - for (i=0; ienergy_rate = strtod (tokens[offset+DKP_WUP_RESPONSE_HEADER_WATTS], NULL) / 10.0f;