? RELEASING
? add.xcf
? add.xpm
? buttons.mbox
? consolehelper
? debian
? delete.xcf
? delete.xpm
? php-gtk-defect-reproduce.txt
? ping.xcf
? ping.xpm
? pptp-php-gtk-20030107.patch
? pptp-php-gtk-20030731.tar.gz
? pptp-php-gtk.desktop
? start.xcf
? start.xpm
? stop.xcf
? stop.xpm
? tmp
? update.xcf
? update.xpm
Index: ChangeLog
===================================================================
RCS file: /cvsroot/pptpclient/pptp-extras/pptp-php-gtk/ChangeLog,v
retrieving revision 1.14
diff -u -r1.14 ChangeLog
--- ChangeLog	31 Jul 2003 01:14:15 -0000	1.14
+++ ChangeLog	16 Dec 2003 22:24:17 -0000
@@ -1,3 +1,14 @@
+Wed Dec 17 09:23:01 2003  James Cameron  <quozl@us.netrek.org>
+
+	* pptp-php-gtk.php: prevent the killing of a group of processes if
+	the pid file is modified to contain a zero.
+
+Fri Oct 24 20:42:15 2003  James Cameron  <quozl@us.netrek.org>
+
+	* pptp-php-gtk.php (stats_show): remove byte and packet counter
+	colour highlighting when changed, as the change of styles induced
+	a memory leak and it was not clear how to avoid this.
+
 Thu Jul 31 09:44:09 2003  James Cameron  <quozl@us.netrek.org>
 
 	* pptp-php-gtk.php: restore default route to public interface
Index: TODO
===================================================================
RCS file: /cvsroot/pptpclient/pptp-extras/pptp-php-gtk/TODO,v
retrieving revision 1.27
diff -u -r1.27 TODO
--- TODO	7 Oct 2003 23:58:12 -0000	1.27
+++ TODO	16 Dec 2003 22:24:19 -0000
@@ -1,3 +1,6 @@
+origin: Joona I Palaste <palaste@cc.helsinki.fi> 24th september 2003
+bug report: if updetach is replaced with nodetach, and the tunnel subsequently terminates, it may remain in initialising state and not be restartable.
+
 origin: jbwiv_home <jbwiv@devsea.com> 8th october 2003
 feature request: move tunnels file into plain text and use one file per
 tunnel.  support old tunnels file format.
@@ -5,13 +8,18 @@
 origin: ?
 bug report: all to tunnel assumes a dial-up route?  needs changes to
 support an ethernet type route, to a gateway IP instead of an
-interface.
+interface.  (the restoration of the default route only works on
+non-dialup?)
 
 origin: Bruno Negrao <redhat@engepel.com.br>
 bug report: ping locks application for a while.
 
 origin: Peter Sheldon <psheldon@icon.co.za>
 bug report: VSZ and SIZE grows and grows while a tunnel is active.
+verified on test machine.  related to byte and packet counter update
+rate, not data traffic load.  related to change of style for change of
+colours of the counters, not to value changes (tested by adding return
+in middle of stats_show()).
 
 origin: Han Pilmeyer, per 05 may added checking code yet to test.
 
@@ -26,7 +34,9 @@
 created rather than after pppd exits.
 
 origin: David Carson <carson.clan@verizon.net> 3rd may 2003
+origin: Joona I Palaste <palaste@cc.helsinki.fi> 24th september 2003
 feature request: need a way to add additional lines to the resolv.conf
+
 
 origin: james cameron
 problem: provide buttons or widgets for certain pptp command line,
Index: pptp-php-gtk.php
===================================================================
RCS file: /cvsroot/pptpclient/pptp-extras/pptp-php-gtk/pptp-php-gtk.php,v
retrieving revision 1.17
diff -u -r1.17 pptp-php-gtk.php
--- pptp-php-gtk.php	31 Jul 2003 01:14:15 -0000	1.17
+++ pptp-php-gtk.php	16 Dec 2003 22:24:41 -0000
@@ -1,4 +1,4 @@
-#!/usr/bin/php4 -q
+#!/usr/lib/pptp-php-gtk/php/bin/php -q
 <?php
 #
 #   $Id: pptp-php-gtk.php,v 1.17 2003/07/31 01:14:15 quozl Exp $
@@ -1129,19 +1129,9 @@
     on_setup_stop_clicked($widget);
 }
 
-# undo colouring of a stats value label, scheduled by stats_show
-function stats_normal($array) {
-    $widget = $array['widget'];
-    $style = $widget->style;
-    $style = $style->copy();
-    $style->fg[GTK_STATE_NORMAL] = $array['old'];
-    $widget->set_style($style);
-    return FALSE;
-}
-
 # show a particular stats value
 function stats_show($tree, $name, $value) {
-    global $stats, $colours, $stos;
+    global $stats, $colours, $stos, $styles;
 
     # but not if it has not changed
     if ($stats[$name] == $value) return;
@@ -1151,17 +1141,7 @@
     $widget = $tree->get_widget($name);
     $widget->set_text(sprintf('%8d', $value));
 
-    # highlight it using the ok colour
-    $style = $widget->style;
-    $style = $style->copy();
-    $array['old'] = $style->text[GTK_STATE_NORMAL];
-    $array['widget'] = $widget;
-    $style->fg[GTK_STATE_NORMAL] = $colours['ok'];
-    $widget->set_style($style);
-
-    # schedule the return to normal colour
-    if ($stos[$name]) gtk::timeout_remove($stos[$name]);
-    $stos[$name] = gtk::timeout_add(1000, 'stats_normal', $array);
+    return;
 }
 
 # update stats in the tunnel window
@@ -1465,9 +1445,21 @@
     $pid = trim(fgets($fp, 32));
     fclose($fp);
 
-    if ($pid == '' || $pid == 1) {
-	message('stop bad pidfile', "Cannot stop tunnel $name,
-file $pidfile contains odd data '$pid'");
+    if ($pid == '') {
+	message('stop bad pidfile 1', "Cannot stop tunnel $name,
+file $pidfile contains no text");
+	return 0;
+    }
+
+    if ($pid == 0) {
+	message('stop bad pidfile 2', "Cannot stop tunnel $name,
+file $pidfile contains a zero pid '$pid'");
+	return 0;
+    }
+
+    if ($pid == 1) {
+	message('stop bad pidfile 3', "Cannot stop tunnel $name,
+file $pidfile contains init's pid '$pid'");
 	return 0;
     }
 
