head 1.2; access; symbols pkgsrc-2026Q1:1.2.0.92 pkgsrc-2026Q1-base:1.2 pkgsrc-2025Q4:1.2.0.90 pkgsrc-2025Q4-base:1.2 pkgsrc-2025Q3:1.2.0.88 pkgsrc-2025Q3-base:1.2 pkgsrc-2025Q2:1.2.0.86 pkgsrc-2025Q2-base:1.2 pkgsrc-2025Q1:1.2.0.84 pkgsrc-2025Q1-base:1.2 pkgsrc-2024Q4:1.2.0.82 pkgsrc-2024Q4-base:1.2 pkgsrc-2024Q3:1.2.0.80 pkgsrc-2024Q3-base:1.2 pkgsrc-2024Q2:1.2.0.78 pkgsrc-2024Q2-base:1.2 pkgsrc-2024Q1:1.2.0.76 pkgsrc-2024Q1-base:1.2 pkgsrc-2023Q4:1.2.0.74 pkgsrc-2023Q4-base:1.2 pkgsrc-2023Q3:1.2.0.72 pkgsrc-2023Q3-base:1.2 pkgsrc-2023Q2:1.2.0.70 pkgsrc-2023Q2-base:1.2 pkgsrc-2023Q1:1.2.0.68 pkgsrc-2023Q1-base:1.2 pkgsrc-2022Q4:1.2.0.66 pkgsrc-2022Q4-base:1.2 pkgsrc-2022Q3:1.2.0.64 pkgsrc-2022Q3-base:1.2 pkgsrc-2022Q2:1.2.0.62 pkgsrc-2022Q2-base:1.2 pkgsrc-2022Q1:1.2.0.60 pkgsrc-2022Q1-base:1.2 pkgsrc-2021Q4:1.2.0.58 pkgsrc-2021Q4-base:1.2 pkgsrc-2021Q3:1.2.0.56 pkgsrc-2021Q3-base:1.2 pkgsrc-2021Q2:1.2.0.54 pkgsrc-2021Q2-base:1.2 pkgsrc-2021Q1:1.2.0.52 pkgsrc-2021Q1-base:1.2 pkgsrc-2020Q4:1.2.0.50 pkgsrc-2020Q4-base:1.2 pkgsrc-2020Q3:1.2.0.48 pkgsrc-2020Q3-base:1.2 pkgsrc-2020Q2:1.2.0.44 pkgsrc-2020Q2-base:1.2 pkgsrc-2020Q1:1.2.0.24 pkgsrc-2020Q1-base:1.2 pkgsrc-2019Q4:1.2.0.46 pkgsrc-2019Q4-base:1.2 pkgsrc-2019Q3:1.2.0.42 pkgsrc-2019Q3-base:1.2 pkgsrc-2019Q2:1.2.0.40 pkgsrc-2019Q2-base:1.2 pkgsrc-2019Q1:1.2.0.38 pkgsrc-2019Q1-base:1.2 pkgsrc-2018Q4:1.2.0.36 pkgsrc-2018Q4-base:1.2 pkgsrc-2018Q3:1.2.0.34 pkgsrc-2018Q3-base:1.2 pkgsrc-2018Q2:1.2.0.32 pkgsrc-2018Q2-base:1.2 pkgsrc-2018Q1:1.2.0.30 pkgsrc-2018Q1-base:1.2 pkgsrc-2017Q4:1.2.0.28 pkgsrc-2017Q4-base:1.2 pkgsrc-2017Q3:1.2.0.26 pkgsrc-2017Q3-base:1.2 pkgsrc-2017Q2:1.2.0.22 pkgsrc-2017Q2-base:1.2 pkgsrc-2017Q1:1.2.0.20 pkgsrc-2017Q1-base:1.2 pkgsrc-2016Q4:1.2.0.18 pkgsrc-2016Q4-base:1.2 pkgsrc-2016Q3:1.2.0.16 pkgsrc-2016Q3-base:1.2 pkgsrc-2016Q2:1.2.0.14 pkgsrc-2016Q2-base:1.2 pkgsrc-2016Q1:1.2.0.12 pkgsrc-2016Q1-base:1.2 pkgsrc-2015Q4:1.2.0.10 pkgsrc-2015Q4-base:1.2 pkgsrc-2015Q3:1.2.0.8 pkgsrc-2015Q3-base:1.2 pkgsrc-2015Q2:1.2.0.6 pkgsrc-2015Q2-base:1.2 pkgsrc-2015Q1:1.2.0.4 pkgsrc-2015Q1-base:1.2 pkgsrc-2014Q4:1.2.0.2 pkgsrc-2014Q4-base:1.2; locks; strict; comment @// @; 1.2 date 2014.12.09.10.45.51; author he; state Exp; branches; next 1.1; commitid gADsJpDHWPH6Zl1y; 1.1 date 2014.10.06.10.04.17; author he; state Exp; branches; next ; commitid N9UrOpMWAXfCO7Tx; desc @@ 1.2 log @It can happen that times() returns ((uint32_t)-1). If that happens, retry a limited number of times, and log the events. Export log() from the main program for use in dbeacon_posix.cpp. Fix the matrix.pl script since qw() no longer acts as parenteses, so add some of our own where called for. Bump PKGREVISION. @ text @$NetBSD: patch-dbeacon.cpp,v 1.1 2014/10/06 10:04:17 he Exp $ Fix pidfile option handling (in configuration file case). Also, export log() for use elsewhere. --- dbeacon.cpp.orig 2007-07-13 13:52:14.000000000 +0000 +++ dbeacon.cpp @@@@ -176,7 +176,7 @@@@ bool daemonize = false; bool use_syslog = false; bool past_init = false; -const char *pidfile = NULL; +static string pidfile; static void next_event(timeval *); static void insert_event(uint32_t, uint32_t); @@@@ -270,7 +270,7 @@@@ static void logv(int level, const char * } } -static void log(int level, const char *format, ...) +void log(int level, const char *format, ...) { va_list vl; va_start(vl, format); @@@@ -464,8 +464,8 @@@@ int main(int argc, char **argv) { perror("Failed to daemon()ize."); return -1; } - if (pidfile) { - FILE *f = fopen(pidfile, "w"); + if (!pidfile.empty()) { + FILE *f = fopen(pidfile.c_str(), "w"); if (f) { fprintf(f, "%u\n", getpid()); fclose(f); @@@@ -1657,8 +1657,8 @@@@ void dumpBigBwStats(int) { void sendLeaveReport(int) { send_report(LEAVE_REPORT); - if (daemonize && pidfile) - unlink(pidfile); + if (daemonize && !pidfile.empty()) + unlink(pidfile.c_str()); exit(0); } @ 1.1 log @Rename the old patch-aa patch to patch-dbeacon.cpp. Add a patch for the matrix.pl script to quiet newer perl versions. Fix the pointer to the sixxs flags, as asked for in 2010(!) Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD: patch-aa,v 1.1 2008/08/26 17:18:14 seb Exp $ d4 1 d17 9 @