openbsd-ports/security/bsd-airtools/patches/patch-dstumbler_log_c
pvalchev 5dc6610854 dstumbler improvements:
- print the times of last seen, etc in proper, human-readable format
- print the times in local timezone format, not GMT
- quick hack to make dstumbler beep when it discovers a new base
station.  it works, as opposed to what was there before (using /dev/spkr)
Thanks to Nikolay Sturm for testing sound
2003-01-14 23:52:39 +00:00

31 lines
933 B
Plaintext

$OpenBSD: patch-dstumbler_log_c,v 1.1 2003/01/14 23:52:40 pvalchev Exp $
--- dstumbler/log.c.orig Fri Nov 8 15:00:50 2002
+++ dstumbler/log.c Fri Nov 8 15:01:08 2002
@@ -55,7 +55,7 @@ log_ap(FILE *fd, struct aps_s *ap, struc
{
struct tm tmval;
- gmtime_r((time_t *)&log->seen.tv_sec, &tmval);
+ localtime_r((time_t *)&log->seen.tv_sec, &tmval);
fprintf(fd, "%c %4.7f\t%c %4.7f\t( %s )\t%s\t"
"( %02x:%02x:%02x:%02x:%02x:%02x )\t"
@@ -122,7 +122,7 @@ log_node(FILE *fd, struct aps_s *ap, str
{
struct tm tmval;
- gmtime_r((time_t *)&log->seen.tv_sec, &tmval);
+ localtime_r((time_t *)&log->seen.tv_sec, &tmval);
fprintf(fd, "#NODE %c %4.7f\t%c %4.7f\t"
"( %02x:%02x:%02x:%02x:%02x:%02x )\t%s\t"
@@ -208,7 +208,7 @@ log_start(char *logfile)
return NULL;
}
- gmtime_r((time_t *)&curr_time, &tmval);
+ localtime_r((time_t *)&curr_time, &tmval);
/* print file header */
fprintf(fd,