freeside/fs_selfservice/FS-SelfService freeside-selfservice-clientd,1.9,1.10
ivan
ivan at pouncequick.420.am
Mon Sep 6 05:44:20 PDT 2004
Update of /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService
In directory pouncequick:/tmp/cvs-serv4452/fs_selfservice/FS-SelfService
Modified Files:
freeside-selfservice-clientd
Log Message:
self-service keepalives
Index: freeside-selfservice-clientd
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/freeside-selfservice-clientd,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- freeside-selfservice-clientd 18 Mar 2004 01:46:40 -0000 1.9
+++ freeside-selfservice-clientd 6 Sep 2004 12:44:17 -0000 1.10
@@ -20,7 +20,8 @@
use vars qw( $Debug );
$Debug = 2; #2 will turn on child logging, 3 will log packet contents,
- #including potentially compromising information
+ #including potentially compromising information, 4 will log
+ #receipts of all packets from server including keepalives (big!)
my $socket = "/usr/local/freeside/selfservice_socket$tag";
my $pid_file = "$socket.pid";
@@ -65,6 +66,9 @@
#sub REAPER { $waitedpid = wait; $SIG{CHLD} = \&REAPER; }
#$SIG{CHLD} = \&REAPER;
+warn "enabling keep alives\n" if $Debug;
+nstore_fd( { _packet => '_enable_keepalive' } , \*STDOUT );
+
warn "entering main loop\n" if $Debug;
my %kids;
@@ -101,10 +105,16 @@
if ( $handle == \*STDIN ) {
- warn "receiving packet from server\n" if $Debug;
+ warn "receiving packet from server\n" if $Debug > 3;
my $packet = fd_retrieve(\*STDIN);
my $token = $packet->{'_token'};
+
+ if ( $token eq '_keepalive' ) {
+ $undisp = 1;
+ next;
+ }
+
warn "received packet from server with token $token\n".
( $Debug > 2
? join('', map { " $_=>$packet->{$_}\n" } keys %$packet )
More information about the freeside-commits
mailing list