[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: wmppp and ISDN



On: 27 Sep 1998 12:34:17 +0200 Torsten Hilbrich writes:

> Does anybody managed to get the following behavior?
> 
> - if I press the checkmark, I want the yellow light to appear to
>   indicate, that my connection is in dial-on-demand state (i.e., the
>   default route is set to ippp0 and the interface is waiting for the
>   next paket to dial out).
> 
> - when the isdn connection is established, the green light should
>   appear and the timer should start

As announced, I looked into the source and made a first patch.  Due
its shortness I will append it to this posting.  If anybody who is
using the program too could test this patch, I could send it to the
maintainer for possible inclusion.

	Torsten

--- wmppp.c.orig	Sun Sep 27 22:32:53 1998
+++ wmppp.c	Sun Sep 27 22:33:02 1998
@@ -310,10 +310,6 @@
 					usage();
 					exit(1);
 				}
-				if (strncmp(argv[i+1], "ppp", 3)) {
-					usage();
-					exit(1);
-				}
 				active_interface = argv[i+1];
 				i++;
 				break;
@@ -473,7 +469,7 @@
 		if (currenttime != lasttime) {
 			i = 0;
 
-			if (stillonline(active_interface)) {
+			if (stillonline(active_interface) > 1) {
 				i = 1;
 				if (!starttime) {
 					starttime = currenttime;
@@ -684,7 +680,7 @@
 	if (fp) {
 		while (fgets(temp, 128, fp)) {
 			if (strstr(temp, ifs)) {
-				i = 1; /* Line is alive */
+				i++; /* Line is alive */
 			}
 		}
 		fclose(fp);


Reply to: