Submitting a patch to allow for auto-refreshing of the webpage. Allows the user to specify how long between refreshes (Seconds) Reproducible: Always Steps to Reproduce: Actual Results: Allows for the page to be refreshed automaticaly using HTML META TAGS. Expected Results: Allows for the page to be refreshed automaticaly using HTML META TAGS. Patch File Contents: --- ctcs-1.4/ctcs 2007-06-05 05:17:46 +0000 +++ ctcs-1.4/ctcs 2008-01-02 15:17:18 +0000 @@ -29,6 +29,7 @@ # global variables my $ver = "1.4"; my $bwinterval = 5; # bandwidth management interval (seconds) +my $refreshInterval = 300; #Page refresh Interval (seconds) my $CTCS_PROTOCOL = "0003"; my $current_client = ""; my (%cfh,%torrents,%ctfile,%ctbw,%ctconfig,%ctdetail,%ctstatus,%ctstime, @@ -548,7 +549,13 @@ HTTP/1.0 200 OK\r Content-Type: text/html\r \r - <HTML><HEAD><TITLE>CTCS - All Torrents</TITLE></HEAD><BODY> + <HTML><HEAD><TITLE>CTCS - All Torrents</TITLE> +EOF + printf $cfh "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"%d\">",$refreshInterval; + print $cfh <<EOF =~ /[^\t]*\n/g; + + <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> + </HEAD><BODY> <CENTER> <H1><A HREF="http://www.rahul.net/dholmes/ctorrent/ctcs.html"> <I>CT</I>orrent <I>C</I>ontrol <I>S</I>erver</A></H1> @@ -569,10 +576,10 @@ "<INPUT NAME=\"ulimit\" TYPE=\"text\" align=right SIZE=4 VALUE=\"%d\">" . "K/s\n</TR>\n", $allul / 1024, $tulimit / 1024; - printf $cfh "<TR><TD><TD align=right>Change interval: " . + printf $cfh "<TR><TD>Reload:<INPUT name=\"refreshInterval\" type=\"text\" size=\"3\" value=\"%d\">sec<TD align=right>Change interval: " . "<INPUT name=\"bwinterval\" type=\"text\" align=right size=3 " . "value=\"%d\">sec</TR>\n", - $bwinterval; + $refreshInterval,$bwinterval; print $cfh "</TABLE></CENTER></FORM>\n\n"; print $cfh "<CENTER><A HREF=\"/alimits\">Advanced Limits</A></CENTER>\n\n"; @@ -1511,6 +1518,7 @@ if ($page =~ /[?&]dlimit=(\d+)/) { $tdlimit = $1 * 1024; } if ($page =~ /[?&]ulimit=(\d+)/) { $tulimit = $1 * 1024; } if ($page =~ /[?&]bwinterval=(\d+)/) { $bwinterval = $1; } + if ($page =~ /[?&]refreshInterval=(\d+)/) { $refreshInterval = $1; } $page =~ s/\?.*//; # print $cfh "HTTP/1.0 205 OK\r\n";
Created attachment 140075 [details, diff] patch file for CTCS This patch allows for user control of page refresh intervals
Please submit this upstream, thanks
(In reply to comment #2) > Please submit this upstream, thanks To be honest this is my first experience with this, could ya tell me what you are refering to?
You should contact the developer of the application, http://www.rahul.net/dholmes/ctorrent/
(In reply to comment #4) > You should contact the developer of the application, > http://www.rahul.net/dholmes/ctorrent/ Ok thanks, I did that at the same time that I posted this =) Thanks Again.