my $date=
sprintf("%d-%.2d-%.2d_%.2d:%.2d:%.2d",$year,$mon,$mday,$hour,$min,$sec);
-if ($ENV{BF_DEBUG} || ($ts > time) || (! $secret) )
+if ($ENV{BF_DEBUG} || ($ts > time) || ($ts + 86400 < time ) || (! $secret) )
{
open(TX,">../buildlogs/$animal.$date");
print TX "sig=$sig\nlogtar-len=" , length($log_archive),
{
my $gmt = gmtime($ts);
print "Status: 491 bad ts parameter - $ts ($gmt GMT) is in the future.\n",
- "Context-Type: text/plain\n\n bad ts parameter - $ts ($gmt GMT) is in the future\n";
+ "Content-Type: text/plain\n\n bad ts parameter - $ts ($gmt GMT) is in the future\n";
$db->disconnect;
exit;
}
+unless ($ts + 86400 > time)
+{
+ my $gmt = gmtime($ts);
+ print "Status: 491 bad ts parameter - $ts ($gmt GMT) is more than 24 hours ago.\n",
+ "Content-Type: text/plain\n\n bad ts parameter - $ts ($gmt GMT) is more than 24 hours ago.\n";
+ $db->disconnect;
+ exit;
+}
+
unless ($secret)
{
print
ALTER FUNCTION public.prevstat(text, text, timestamp without time zone) OWNER TO pgbuildfarm;
+--
+-- Name: target(text); Type: FUNCTION; Schema: public; Owner: pgbuildfarm
+--
+
+CREATE FUNCTION target(t text) RETURNS text
+ AS $_$ my $log = shift; $log =~ s/.*(Target:[^\n]*).*/$1/s; return $log; $_$
+ LANGUAGE plperl;
+
+
+ALTER FUNCTION public.target(t text) OWNER TO pgbuildfarm;
+
SET default_tablespace = '';
SET default_with_oids = true;
ALTER TABLE public.buildsystems_export OWNER TO pgbuildfarm;
+--
+-- Name: failures; Type: VIEW; Schema: public; Owner: pgbuildfarm
+--
+
+CREATE VIEW failures AS
+ SELECT build_status.sysname, build_status.snapshot, build_status.stage, build_status.conf_sum, build_status.branch, build_status.changed_this_run, build_status.changed_since_success, build_status.log_archive_filenames, build_status.build_flags, build_status.report_time FROM build_status WHERE (((build_status.stage <> 'OK'::text) AND (build_status.stage !~~ 'CVS%'::text)) AND (build_status.report_time IS NOT NULL));
+
+
+ALTER TABLE public.failures OWNER TO pgbuildfarm;
+
--
-- Name: list_subscriptions; Type: TABLE; Schema: public; Owner: pgbuildfarm; Tablespace:
--