On Tue, Jul 19, 2011 at 9:00 AM, Ken Dreyer <[email protected]> wrote:
> I had to modify
> Smokeping.pm's cgi() to take $q as a second argument rather than
> creating a new CGI object upon each invocation.

For those interested, here is my patch against Smokeping.pm to use
FastCGI. Note that you'll also have to modify the .cgi file(s) like I
described in my previous email.

- Ken
diff -ur smokeping-2.4.2/lib/Smokeping.pm smokeping-dev/lib/Smokeping.pm
--- smokeping-2.4.2/lib/Smokeping.pm	2008-07-24 11:37:05.000000000 -0600
+++ smokeping-dev/lib/Smokeping.pm	2011-07-02 16:15:11.000000000 -0600
@@ -1376,7 +1376,7 @@
              print "Content-Length: ".length($data)."\n\n";
              print $data;
              unlink "${imgbase}_${end}_${start}.png";
-             exit;
         } 
         elsif ($mode eq 'n'){ # navigator mode
 #           $page .= qq|<div class="zoom" style="cursor: crosshair;">|;
@@ -3843,11 +3843,12 @@
 POD
 
 }
-sub cgi ($) {
+sub cgi ($$) {
     $cgimode = 'yes';
     umask 022;
     load_cfg shift;
-    my $q=new CGI;
+    my $q = shift;
     initialize_cgilog();
     if ($q->param(-name=>'slave')) { # a slave is calling in
         Smokeping::Master::answer_slave($cfg,$q);
_______________________________________________
smokeping-users mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users

Reply via email to