diff --git a/owlps-listener/owlps-listener.h b/owlps-listener/owlps-listener.h index eae4ea2..dcf864a 100644 --- a/owlps-listener/owlps-listener.h +++ b/owlps-listener/owlps-listener.h @@ -162,6 +162,8 @@ enum {MODE_ACTIVE = 'a', MODE_PASSIVE = 'p', MODE_MIXED = 'm'} ; * Returns the number of bytes needed to jump after a (radiotap) field of * length 'FIELD_LEN' that should sit at the position 'OFFSET' in the * buffer, taking into account alignment considerations. + * Warning: do *not* pass an incremented number as FIELD_LEN (e.g. + * field_len++ or ++field_len). This shouldn't normally be useful anyway. */ #define SKIP_FIELD(OFFSET, FIELD_LEN) \ ((FIELD_LEN) + nat_align((OFFSET), (FIELD_LEN))) diff --git a/owlps-listener/owlps-listenerd.c b/owlps-listener/owlps-listenerd.c index d91bfaa..fd193ae 100644 --- a/owlps-listener/owlps-listenerd.c +++ b/owlps-listener/owlps-listenerd.c @@ -1698,7 +1698,8 @@ void send_autocalibration_request() /* * Creates the calibration packet to send. - * The packet must be freed by the calling function. + * 'packet' must not be NULL. '*packet' must be freed by the calling + * function. * Returns the size of the packet. * In case of error, 0 is returned and *packet is not updated. */ @@ -1714,6 +1715,8 @@ uint_fast16_t make_packet(uint8_t **packet) my_position_z = owl_htonf(GET_MY_POSITION_Z()) ; uint16_t npkt ; + assert(packet) ; + owl_timestamp_now(&request_time) ; if (VERBOSE_CHATTERBOX)