]> git.ozlabs.org Git - ppp.git/commitdiff
Bring up the link on an explicit call from main() rather than
authorPaul Mackerras <paulus@samba.org>
Tue, 12 Jul 2005 01:07:59 +0000 (01:07 +0000)
committerPaul Mackerras <paulus@samba.org>
Tue, 12 Jul 2005 01:07:59 +0000 (01:07 +0000)
doing it in link_required().  With the old way, it was restarting
the link in the middle of link_terminated().

pppd/auth.c
pppd/main.c
pppd/pppd.h

index 92fe82d9cac8e56fc64405a4c1f3641ecc951f36..e435e6c7fea0d540e875f05a6cdf26f051f0f9b2 100644 (file)
@@ -68,7 +68,7 @@
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#define RCSID  "$Id: auth.c,v 1.104 2005/07/09 05:49:44 paulus Exp $"
+#define RCSID  "$Id: auth.c,v 1.105 2005/07/12 01:07:59 paulus Exp $"
 
 #include <stdio.h>
 #include <stddef.h>
@@ -526,11 +526,18 @@ set_permitted_number(argv)
 
 /*
  * An Open on LCP has requested a change from Dead to Establish phase.
- * Do what's necessary to bring the physical layer up.
  */
 void
 link_required(unit)
     int unit;
+{
+}
+
+/*
+ * Bring the link up to the point of being able to do ppp.
+ */
+void start_link(unit)
+    int unit;
 {
     char *msg;
 
index b5702f2b07ffabe274661511c67d9ffb4cfda7ee..be212daa171f36cfa3c0922fc5f92b430b014a62 100644 (file)
@@ -66,7 +66,7 @@
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#define RCSID  "$Id: main.c,v 1.150 2005/03/21 09:20:16 paulus Exp $"
+#define RCSID  "$Id: main.c,v 1.151 2005/07/12 01:07:59 paulus Exp $"
 
 #include <stdio.h>
 #include <ctype.h>
@@ -534,6 +534,7 @@ main(argc, argv)
        script_unsetenv("BYTES_RCVD");
 
        lcp_open(0);            /* Start protocol */
+       start_link(0);
        while (phase != PHASE_DEAD) {
            handle_events();
            get_input();
index deab65a3a1ee68b95a4b30b061fec8ae9eae4906..3a95d35349ff42e988b69f4f45105d8b710aa05b 100644 (file)
@@ -39,7 +39,7 @@
  * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Id: pppd.h,v 1.89 2004/11/14 22:53:42 carlsonj Exp $
+ * $Id: pppd.h,v 1.90 2005/07/12 01:07:59 paulus Exp $
  */
 
 /*
@@ -525,6 +525,7 @@ ssize_t complete_read __P((int, void *, size_t));
 
 /* Procedures exported from auth.c */
 void link_required __P((int));   /* we are starting to use the link */
+void start_link __P((int));      /* bring the link up now */
 void link_terminated __P((int));  /* we are finished with the link */
 void link_down __P((int));       /* the LCP layer has left the Opened state */
 void upper_layers_down __P((int));/* take all NCPs down */