summaryrefslogtreecommitdiffstats
path: root/src/usbmux.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2009-06-15 13:02:10 +0200
committerGravatar Nikias Bassen2009-06-15 13:02:10 +0200
commit2417678145a801bd311f64e55a07378dab6f3ba0 (patch)
tree532e5161c68a79768b0e003de53a8067fa08e713 /src/usbmux.c
parentb45560b1a982aab1063eb6fbd65122650efafe9d (diff)
downloadusbmuxd-2417678145a801bd311f64e55a07378dab6f3ba0.tar.gz
usbmuxd-2417678145a801bd311f64e55a07378dab6f3ba0.tar.bz2
removed some #ifdefs to make debugging output more verbose
Diffstat (limited to 'src/usbmux.c')
-rw-r--r--src/usbmux.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/usbmux.c b/src/usbmux.c
index c64d1a0..87cdede 100644
--- a/src/usbmux.c
+++ b/src/usbmux.c
@@ -131,7 +131,6 @@ void log_debug_msg(const char *format, ...)
#endif
}
-#ifdef DEBUG
/**
* for debugging purposes.
*/
@@ -168,7 +167,6 @@ static void print_buffer(const char *data, const int length)
}
printf("\n");
}
-#endif
void hton_header(usbmux_tcp_header * hdr)
{
@@ -455,14 +453,13 @@ int send_to_device(usbmux_device_t device, char *data, int datalen)
int retrycount = 0;
int bytes = 0;
-#ifdef DEBUG
-#ifdef DEBUG_MORE
+if (toto_debug > 0) {
printf("===============================\n%s: trying to send\n",
__func__);
print_buffer(data, datalen);
printf("===============================\n");
-#endif
-#endif
+}
+
do {
if (retrycount > 3) {
log_debug_msg
@@ -499,7 +496,6 @@ int send_to_device(usbmux_device_t device, char *data, int datalen)
}
} while (0); // fall out
-#ifdef DEBUG
if (bytes > 0) {
if (toto_debug > 0) {
printf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n");
@@ -508,7 +504,6 @@ int send_to_device(usbmux_device_t device, char *data, int datalen)
printf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n");
}
}
-#endif
return bytes;
}
@@ -549,7 +544,6 @@ int recv_from_device_timeout(usbmux_device_t device, char *data,
}
return bytes;
}
-#ifdef DEBUG
if (bytes > 0) {
if (toto_debug > 0) {
printf("<<<<<<<<<<<<<<<<<<<<<<<<<<<\n");
@@ -558,7 +552,6 @@ int recv_from_device_timeout(usbmux_device_t device, char *data,
printf("<<<<<<<<<<<<<<<<<<<<<<<<<<<\n");
}
}
-#endif
return bytes;
}