From 601e70e8ee757b769bdc10b16e108e846a1a0b93 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Fri, 24 Jul 2009 17:46:30 +0200 Subject: Rename iphone_set_debug() to iphone_set_debug_level() and code using it --- src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/utils.c') diff --git a/src/utils.c b/src/utils.c index 5b0872d..121bc55 100644 --- a/src/utils.c +++ b/src/utils.c @@ -31,7 +31,7 @@ uint16_t dbg_mask = 0; * * @param level Set to 0 for no debugging or 1 for debugging. */ -void iphone_set_debug(int level) +void iphone_set_debug_level(int level) { toto_debug = level; } -- cgit v1.1-32-gdbae From 83529098fbf4b39b2643a7c0bf39828247d11f9a Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Fri, 24 Jul 2009 22:21:53 +0200 Subject: Improve debug output messages by using __func__ everywhere and adjust wording --- src/utils.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/utils.c') diff --git a/src/utils.c b/src/utils.c index 121bc55..6535a07 100644 --- a/src/utils.c +++ b/src/utils.c @@ -116,13 +116,12 @@ inline void log_debug_buffer(const char *data, const int length) inline void dump_debug_buffer(const char *file, const char *data, const int length) { #ifndef STRIP_DEBUG_CODE - /* run the real fprintf */ if (toto_debug) { FILE *my_ssl_packet = fopen(file, "w+"); fwrite(data, 1, length, my_ssl_packet); fflush(my_ssl_packet); - fprintf(stderr, "Wrote SSL packet to drive, too.\n"); + fprintf(stderr, "%s: Wrote SSL packet to drive, too.\n", __func__); fclose(my_ssl_packet); } #endif -- cgit v1.1-32-gdbae From 028646335acca403cc8a601d77c2272e077445e0 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Sat, 25 Jul 2009 01:08:41 +0200 Subject: Fix includes of utils --- src/utils.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/utils.c') diff --git a/src/utils.c b/src/utils.c index 6535a07..3c08351 100644 --- a/src/utils.c +++ b/src/utils.c @@ -20,7 +20,10 @@ */ #include #include +#include + #include "utils.h" +#include "libiphone/libiphone.h" int toto_debug = 0; uint16_t dbg_mask = 0; -- cgit v1.1-32-gdbae