mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-04 23:23:43 +02:00
tools/dirtpan/: introduced terse debug messages also for timeouts
- dirtpan.c (debug_event, ack_timeout, reass_timeout): renamed debug_event to debug_timeout - dirtpan.c (debug_timeout): print a terse debug message if debug == 1
This commit is contained in:
parent
29e56c77ac
commit
a1a508e749
@ -145,10 +145,14 @@ static void debug_dirt(const char *label, void *buf, int size)
|
||||
}
|
||||
|
||||
|
||||
static void debug_event(const char *label)
|
||||
static void debug_timeout(const char *label)
|
||||
{
|
||||
if (!debug)
|
||||
return;
|
||||
if (debug == 1) {
|
||||
fprintf(stderr, "*%c", *label);
|
||||
return;
|
||||
}
|
||||
debug_label(label);
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
@ -347,7 +351,7 @@ static void tx_pck(void *buf, int size)
|
||||
|
||||
static void ack_timeout(void)
|
||||
{
|
||||
debug_event("ACK-TO");
|
||||
debug_timeout("ACK-TO");
|
||||
if (++retries == MAX_TRIES)
|
||||
state = s_idle;
|
||||
else
|
||||
@ -357,7 +361,7 @@ static void ack_timeout(void)
|
||||
|
||||
static void reass_timeout(void)
|
||||
{
|
||||
debug_event("REASS-TO");
|
||||
debug_timeout("REASS-TO");
|
||||
state = s_idle;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user