Skip to content

Commit

Permalink
Host
Browse files Browse the repository at this point in the history
 - Stop systime from file being overwritten by current time
  • Loading branch information
dominicgs committed Jul 4, 2012
1 parent e0ccd63 commit 861093f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion host/bluetooth_rxtx/Makefile
Expand Up @@ -17,7 +17,7 @@
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.

CC = gcc
CC ?= gcc
OPTFLAGS = -O2
ANGRYFLAGS = -Wall #-Wextra -pedantic
OS = $(shell uname)
Expand Down
2 changes: 1 addition & 1 deletion host/bluetooth_rxtx/ubertooth-lap.c
Expand Up @@ -24,6 +24,7 @@
#include <getopt.h>

extern char Ubertooth_Device;
extern FILE *infile;
extern FILE *dumpfile;
extern int max_ac_errors;

Expand All @@ -43,7 +44,6 @@ int main(int argc, char *argv[])
{
int opt;
struct libusb_device_handle *devh = NULL;
FILE* infile = NULL;

while ((opt=getopt(argc,argv,"hi:U:d:e:")) != EOF) {
switch(opt) {
Expand Down
2 changes: 1 addition & 1 deletion host/bluetooth_rxtx/ubertooth-uap.c
Expand Up @@ -26,6 +26,7 @@

extern char Ubertooth_Device;
extern FILE *dumpfile;
extern FILE *infile;
extern int max_ac_errors;

static void usage()
Expand All @@ -47,7 +48,6 @@ int main(int argc, char *argv[])
int have_lap = 0;
char *end;
struct libusb_device_handle *devh = NULL;
FILE *infile = NULL;
piconet pn;

init_piconet(&pn);
Expand Down
4 changes: 2 additions & 2 deletions host/bluetooth_rxtx/ubertooth.c
Expand Up @@ -326,12 +326,12 @@ static void cb_lap(void* args, usb_pkt_rx *rx, int bank)
/* Bottom clkn bit not needed, clk1 period is 625 uS. */
clk1 = clk0 / 2;

/* When reading from file , caller will read
/* When reading from file, caller will read
* systime before calling this routine, so do
* not overwrite. Otherwise, get current time. */
if ( infile == NULL )
systime = time(NULL);
printf("systime=%u ch=%d LAP=%06x err=%u clk100ns=%u clk1=%u s=%d n=%d snr=%d\n",
printf("systime=%u ch=%2d LAP=%06x err=%u clk100ns=%u clk1=%u s=%d n=%d snr=%d\n",
(int)systime, rx->channel, r.LAP, r.error_count,
clk100ns, clk1, signal_level, noise_level, snr);

Expand Down

0 comments on commit 861093f

Please sign in to comment.