diff options
| author | 2009-06-15 13:02:10 +0200 | |
|---|---|---|
| committer | 2009-06-15 13:02:10 +0200 | |
| commit | 2417678145a801bd311f64e55a07378dab6f3ba0 (patch) | |
| tree | 532e5161c68a79768b0e003de53a8067fa08e713 | |
| parent | b45560b1a982aab1063eb6fbd65122650efafe9d (diff) | |
| download | usbmuxd-2417678145a801bd311f64e55a07378dab6f3ba0.tar.gz usbmuxd-2417678145a801bd311f64e55a07378dab6f3ba0.tar.bz2 | |
removed some #ifdefs to make debugging output more verbose
| -rw-r--r-- | src/usbmux.c | 13 |
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, ...) | |||
| 131 | #endif | 131 | #endif |
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | #ifdef DEBUG | ||
| 135 | /** | 134 | /** |
| 136 | * for debugging purposes. | 135 | * for debugging purposes. |
| 137 | */ | 136 | */ |
| @@ -168,7 +167,6 @@ static void print_buffer(const char *data, const int length) | |||
| 168 | } | 167 | } |
| 169 | printf("\n"); | 168 | printf("\n"); |
| 170 | } | 169 | } |
| 171 | #endif | ||
| 172 | 170 | ||
| 173 | void hton_header(usbmux_tcp_header * hdr) | 171 | void hton_header(usbmux_tcp_header * hdr) |
| 174 | { | 172 | { |
| @@ -455,14 +453,13 @@ int send_to_device(usbmux_device_t device, char *data, int datalen) | |||
| 455 | int retrycount = 0; | 453 | int retrycount = 0; |
| 456 | int bytes = 0; | 454 | int bytes = 0; |
| 457 | 455 | ||
| 458 | #ifdef DEBUG | 456 | if (toto_debug > 0) { |
| 459 | #ifdef DEBUG_MORE | ||
| 460 | printf("===============================\n%s: trying to send\n", | 457 | printf("===============================\n%s: trying to send\n", |
| 461 | __func__); | 458 | __func__); |
| 462 | print_buffer(data, datalen); | 459 | print_buffer(data, datalen); |
| 463 | printf("===============================\n"); | 460 | printf("===============================\n"); |
| 464 | #endif | 461 | } |
| 465 | #endif | 462 | |
| 466 | do { | 463 | do { |
| 467 | if (retrycount > 3) { | 464 | if (retrycount > 3) { |
| 468 | log_debug_msg | 465 | log_debug_msg |
| @@ -499,7 +496,6 @@ int send_to_device(usbmux_device_t device, char *data, int datalen) | |||
| 499 | } | 496 | } |
| 500 | } while (0); // fall out | 497 | } while (0); // fall out |
| 501 | 498 | ||
| 502 | #ifdef DEBUG | ||
| 503 | if (bytes > 0) { | 499 | if (bytes > 0) { |
| 504 | if (toto_debug > 0) { | 500 | if (toto_debug > 0) { |
| 505 | printf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n"); | 501 | printf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n"); |
| @@ -508,7 +504,6 @@ int send_to_device(usbmux_device_t device, char *data, int datalen) | |||
| 508 | printf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n"); | 504 | printf(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n"); |
| 509 | } | 505 | } |
| 510 | } | 506 | } |
| 511 | #endif | ||
| 512 | return bytes; | 507 | return bytes; |
| 513 | } | 508 | } |
| 514 | 509 | ||
| @@ -549,7 +544,6 @@ int recv_from_device_timeout(usbmux_device_t device, char *data, | |||
| 549 | } | 544 | } |
| 550 | return bytes; | 545 | return bytes; |
| 551 | } | 546 | } |
| 552 | #ifdef DEBUG | ||
| 553 | if (bytes > 0) { | 547 | if (bytes > 0) { |
| 554 | if (toto_debug > 0) { | 548 | if (toto_debug > 0) { |
| 555 | printf("<<<<<<<<<<<<<<<<<<<<<<<<<<<\n"); | 549 | printf("<<<<<<<<<<<<<<<<<<<<<<<<<<<\n"); |
| @@ -558,7 +552,6 @@ int recv_from_device_timeout(usbmux_device_t device, char *data, | |||
| 558 | printf("<<<<<<<<<<<<<<<<<<<<<<<<<<<\n"); | 552 | printf("<<<<<<<<<<<<<<<<<<<<<<<<<<<\n"); |
| 559 | } | 553 | } |
| 560 | } | 554 | } |
| 561 | #endif | ||
| 562 | 555 | ||
| 563 | return bytes; | 556 | return bytes; |
| 564 | } | 557 | } |
