]> git.ozlabs.org Git - ppp.git/commitdiff
Don't fall over if the channel doesn't have a disconnect method.
authorPaul Mackerras <paulus@samba.org>
Tue, 13 Jan 2004 04:00:34 +0000 (04:00 +0000)
committerPaul Mackerras <paulus@samba.org>
Tue, 13 Jan 2004 04:00:34 +0000 (04:00 +0000)
pppd/main.c

index 86315662b0611ba6b7d62434ee8b380e9c10396b..1c570eee7860338ae31139ef7f4ed6e06d46a4e2 100644 (file)
@@ -40,7 +40,7 @@
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#define RCSID  "$Id: main.c,v 1.130 2003/12/17 08:56:05 kad Exp $"
+#define RCSID  "$Id: main.c,v 1.131 2004/01/13 04:00:34 paulus Exp $"
 
 #include <stdio.h>
 #include <ctype.h>
@@ -589,7 +589,8 @@ main(argc, argv)
         */
     disconnect:
        new_phase(PHASE_DISCONNECT);
-       the_channel->disconnect();
+       if (the_channel->disconnect)
+           the_channel->disconnect();
 
     fail:
        if (the_channel->cleanup)