Use bundle_Phase(), not bundle->phase.

This commit is contained in:
Brian Somers 1998-03-25 00:59:38 +00:00
parent 1e991daad5
commit 9e46ce35b5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/cvs2svn/branches/MP/; revision=34884
3 changed files with 8 additions and 8 deletions

View file

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: bundle.c,v 1.1.2.30 1998/03/19 22:25:44 brian Exp $
* $Id: bundle.c,v 1.1.2.31 1998/03/20 19:47:40 brian Exp $
*/
#include <sys/param.h>
@ -178,7 +178,7 @@ bundle_LayerStart(void *v, struct fsm *fp)
/* The given FSM is about to start up ! */
struct bundle *bundle = (struct bundle *)v;
if (fp->proto == PROTO_LCP && bundle->phase == PHASE_DEAD)
if (fp->proto == PROTO_LCP && bundle_Phase(bundle) == PHASE_DEAD)
bundle_NewPhase(bundle, PHASE_ESTABLISH);
}
@ -713,7 +713,7 @@ bundle_Open(struct bundle *bundle, const char *name)
if (name != NULL)
break;
}
if (bundle->phase == PHASE_DEAD)
if (bundle_Phase(bundle) == PHASE_DEAD)
bundle_NewPhase(bundle, PHASE_ESTABLISH);
}

View file

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: datalink.c,v 1.1.2.26 1998/03/18 21:54:03 brian Exp $
* $Id: datalink.c,v 1.1.2.27 1998/03/20 19:47:54 brian Exp $
*/
#include <sys/param.h>
@ -390,8 +390,8 @@ datalink_LayerUp(void *v, struct fsm *fp)
dl->lcp.auth_ineed = dl->lcp.want_auth;
dl->lcp.auth_iwait = dl->lcp.his_auth;
if (dl->lcp.his_auth || dl->lcp.want_auth) {
if (dl->bundle->phase == PHASE_DEAD ||
dl->bundle->phase == PHASE_ESTABLISH)
if (bundle_Phase(dl->bundle) == PHASE_DEAD ||
bundle_Phase(dl->bundle) == PHASE_ESTABLISH)
bundle_NewPhase(dl->bundle, PHASE_AUTHENTICATE);
LogPrintf(LogPHASE, "%s: his = %s, mine = %s\n", dl->name,
Auth2Nam(dl->lcp.his_auth), Auth2Nam(dl->lcp.want_auth));

View file

@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: main.c,v 1.121.2.35 1998/03/16 22:54:10 brian Exp $
* $Id: main.c,v 1.121.2.36 1998/03/20 19:48:11 brian Exp $
*
* TODO:
* o Add commands for traffic summary, version display, etc.
@ -611,7 +611,7 @@ DoLoop(struct bundle *bundle)
* Process on-demand dialup. Output packets are queued within tunnel
* device until IPCP is opened.
*/
if (bundle->phase == PHASE_DEAD && (mode & MODE_AUTO) &&
if (bundle_Phase(bundle) == PHASE_DEAD && (mode & MODE_AUTO) &&
(pri = PacketCheck(bundle, tun.data, n, &bundle->filter.dial)) >= 0)
bundle_Open(bundle, NULL);