From: Paul Mackerras Date: Thu, 4 Apr 1996 03:35:37 +0000 (+0000) Subject: Check which compressors are supported in the kernel before X-Git-Tag: RELEASE_2_3_6~502 X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=e9316875506b5cd49e43d65ff25650fe20612fe1;hp=207a89d48f28c6c340b34731567d9d0881e93af6;p=ppp.git Check which compressors are supported in the kernel before deciding whether to open CCP in silent mode or not. --- diff --git a/pppd/ccp.c b/pppd/ccp.c index 6f3c1ea..a0eb2ad 100644 --- a/pppd/ccp.c +++ b/pppd/ccp.c @@ -26,9 +26,10 @@ */ #ifndef lint -static char rcsid[] = "$Id: ccp.c,v 1.15 1996/01/18 03:20:25 paulus Exp $"; +static char rcsid[] = "$Id: ccp.c,v 1.16 1996/04/04 03:35:37 paulus Exp $"; #endif +#include #include #include #include @@ -142,8 +143,15 @@ ccp_open(unit) if (f->state != OPENED) ccp_flags_set(unit, 1, 0); - if (!ANY_COMPRESS(ccp_wantoptions[unit])) + + /* + * Find out which compressors the kernel supports before + * deciding whether to open in silent mode. + */ + ccp_resetci(f); + if (!ANY_COMPRESS(ccp_gotoptions[unit])) f->flags |= OPT_SILENT; + fsm_open(f); } @@ -259,7 +267,6 @@ static void ccp_resetci(f) fsm *f; { - int ok; ccp_options *go = &ccp_gotoptions[f->unit]; u_char opt_buf[16];