mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
Fixed bug in debug print noticed by Linus.
This commit is contained in:
parent
4a96e12890
commit
6c813f0fb1
@ -95,7 +95,7 @@
|
|||||||
#warning "Erbium example without CoAP-specifc functionality"
|
#warning "Erbium example without CoAP-specifc functionality"
|
||||||
#endif /* CoAP-specific example */
|
#endif /* CoAP-specific example */
|
||||||
|
|
||||||
#define DEBUG 0
|
#define DEBUG 1
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
#define PRINTF(...) printf(__VA_ARGS__)
|
#define PRINTF(...) printf(__VA_ARGS__)
|
||||||
#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15])
|
#define PRINT6ADDR(addr) PRINTF("[%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x]", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7], ((uint8_t *)addr)[8], ((uint8_t *)addr)[9], ((uint8_t *)addr)[10], ((uint8_t *)addr)[11], ((uint8_t *)addr)[12], ((uint8_t *)addr)[13], ((uint8_t *)addr)[14], ((uint8_t *)addr)[15])
|
||||||
@ -479,7 +479,7 @@ pushing_periodic_handler(resource_t *r)
|
|||||||
|
|
||||||
++obs_counter;
|
++obs_counter;
|
||||||
|
|
||||||
PRINTF("TICK %u for /%s\n", periodic_i, r->url);
|
PRINTF("TICK %u for /%s\n", obs_counter, r->url);
|
||||||
|
|
||||||
/* Build notification. */
|
/* Build notification. */
|
||||||
coap_packet_t notification[1]; /* This way the packet can be treated as pointer as usual. */
|
coap_packet_t notification[1]; /* This way the packet can be treated as pointer as usual. */
|
||||||
|
Loading…
Reference in New Issue
Block a user