aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetter Reinholdtsen <pere@hungry.com>2006-08-27 09:39:14 +0000
committerPetter Reinholdtsen <pere@hungry.com>2006-08-27 09:39:14 +0000
commitd2e613ce766fe9d17d326b05d5a9688426000f09 (patch)
tree67207672f529e679c8106994af4ba24edb49cd85
parent23f8d53fa3eaf5b18212a23a274b55fca72357a5 (diff)
downloadsitesummary-d2e613ce766fe9d17d326b05d5a9688426000f09.tar.gz
sitesummary-d2e613ce766fe9d17d326b05d5a9688426000f09.tar.bz2
sitesummary-d2e613ce766fe9d17d326b05d5a9688426000f09.tar.xz
* Make temp file name more unique by adding process id to it, while
I wait for a working getpeername call.
-rw-r--r--debian/changelog2
-rw-r--r--sitesummary-collector.cgi2
2 files changed, 3 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 9923d2f..40ad299 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
sitesummary (0.0.2) UNRELEASED; urgency=low
* Not released yet.
+ * Make temp file name more unique by adding process id to it, while
+ I wait for a working getpeername call.
-- Petter Reinholdtsen <pere@debian.org> Sat, 26 Aug 2006 12:10:27 +0200
diff --git a/sitesummary-collector.cgi b/sitesummary-collector.cgi
index be640b4..1c225d7 100644
--- a/sitesummary-collector.cgi
+++ b/sitesummary-collector.cgi
@@ -74,7 +74,7 @@ if ($filename =~ m/.tar.gz$/) {
}
# XXX Come up with some unique file name.
-my $savefile = "$basedir/tmpstorage/$peeripaddr-$timestamp-$filename";
+my $savefile = "$basedir/tmpstorage/$peeripaddr-$timestamp-$$-$filename";
open(SITESUMMARY, ">$savefile") or die "Unable to write to $savefile";
print SITESUMMARY @entry;