pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mbone/dbeacon Fix pidfile option handling (in configur...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8fc41ef34920
branches:  trunk
changeset: 546301:8fc41ef34920
user:      seb <seb%pkgsrc.org@localhost>
date:      Tue Aug 26 17:18:14 2008 +0000

description:
Fix pidfile option handling (in configuration file case).
Bump PKGREVISION to 1.

diffstat:

 mbone/dbeacon/Makefile         |   4 ++--
 mbone/dbeacon/distinfo         |   3 ++-
 mbone/dbeacon/patches/patch-aa |  35 +++++++++++++++++++++++++++++++++++
 3 files changed, 39 insertions(+), 3 deletions(-)

diffs (64 lines):

diff -r 976429343412 -r 8fc41ef34920 mbone/dbeacon/Makefile
--- a/mbone/dbeacon/Makefile    Tue Aug 26 17:10:02 2008 +0000
+++ b/mbone/dbeacon/Makefile    Tue Aug 26 17:18:14 2008 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.1.1.1 2008/08/26 15:01:54 seb Exp $
+# $NetBSD: Makefile,v 1.2 2008/08/26 17:18:14 seb Exp $
 #
 
 DISTNAME=      dbeacon-0.3.9.1
-#PKGREVISION=  1
+PKGREVISION=   1
 CATEGORIES=    mbone
 MASTER_SITES=  http://fivebits.net/files/dbeacon/
 
diff -r 976429343412 -r 8fc41ef34920 mbone/dbeacon/distinfo
--- a/mbone/dbeacon/distinfo    Tue Aug 26 17:10:02 2008 +0000
+++ b/mbone/dbeacon/distinfo    Tue Aug 26 17:18:14 2008 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.1.1.1 2008/08/26 15:01:54 seb Exp $
+$NetBSD: distinfo,v 1.2 2008/08/26 17:18:14 seb Exp $
 
 SHA1 (dbeacon-0.3.9.1.tar.gz) = d6131e723a251c01d245fcb3ead864f1348e2565
 RMD160 (dbeacon-0.3.9.1.tar.gz) = 81ec4cfe1c2890c7cdb5afbbd98fd2d0cf2a57a3
 Size (dbeacon-0.3.9.1.tar.gz) = 43893 bytes
+SHA1 (patch-aa) = a05a777dfcf7543eab85901c63ce85d927e03853
diff -r 976429343412 -r 8fc41ef34920 mbone/dbeacon/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mbone/dbeacon/patches/patch-aa    Tue Aug 26 17:18:14 2008 +0000
@@ -0,0 +1,35 @@
+$NetBSD: patch-aa,v 1.1 2008/08/26 17:18:14 seb Exp $
+
+--- 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);
+@@ -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);
+ }
+ 



Home | Main Index | Thread Index | Old Index