Don't use `sppp.pp_phase' if we don't HAVE_I4B_ACCT. This is an ugly hack

1999-03-18  Martin Baulig  <martin@home-of-linux.org>

	* ppp.c: Don't use `sppp.pp_phase' if we don't HAVE_I4B_ACCT.
	This is an ugly hack until someone tells me which versions have
	this field and which not.
This commit is contained in:
Martin Baulig
1999-03-18 09:27:44 +00:00
committed by Martin Baulig
parent fe98fde338
commit 38554dbcbe
2 changed files with 12 additions and 0 deletions

View File

@@ -1,3 +1,9 @@
1999-03-18 Martin Baulig <martin@home-of-linux.org>
* ppp.c: Don't use `sppp.pp_phase' if we don't HAVE_I4B_ACCT.
This is an ugly hack until someone tells me which versions have
this field and which not.
1999-02-25 Martin Baulig <martin@home-of-linux.org>
* prockernel.c, proctime.c: Applied patch Stanislav Grozev for

View File

@@ -110,10 +110,15 @@ glibtop_get_ppp_p (glibtop *server, glibtop_ppp *buf, unsigned short device)
#ifdef HAVE_I4B_ACCT
phase = data.sc_if_un.scu_sp.pp_phase;
#else
/* FIXME: Which FreeBSD version have this field and
* which not. */
#if 0
phase = data.pp_phase;
#endif
#endif
switch (phase) {
#ifdef HAVE_I4B_ACCT
case PHASE_DEAD:
case PHASE_TERMINATE:
buf->state = GLIBTOP_PPP_STATE_HANGUP;
@@ -122,6 +127,7 @@ glibtop_get_ppp_p (glibtop *server, glibtop_ppp *buf, unsigned short device)
case PHASE_NETWORK:
buf->state = GLIBTOP_PPP_STATE_ONLINE;
break;
#endif
default:
buf->state = GLIBTOP_PPP_STATE_UNKNOWN;
break;