diff options
author | Brian Somers <brian@FreeBSD.org> | 1998-05-15 18:21:45 +0000 |
---|---|---|
committer | Brian Somers <brian@FreeBSD.org> | 1998-05-15 18:21:45 +0000 |
commit | ea7229694b5a94840ef14aa0bb71bb338f02bbe9 (patch) | |
tree | 6e31ff75dee8c20d89e12d43462147f08146ad96 /usr.sbin/ppp/datalink.c | |
parent | 0a1b5c9d9ea926382e954159457256df082cf0be (diff) | |
download | src-ea7229694b5a94840ef14aa0bb71bb338f02bbe9.tar.gz src-ea7229694b5a94840ef14aa0bb71bb338f02bbe9.zip |
o Call bundle_LinkClosed() when transferring a datalink so that
the bundle has the opportunity to go PHASE_DEAD and cleanup
the interface (if it's the last link).
o Regnerate our phys_type value when we transfer the link.
o Always clean up the interface when destroying our bundle in case
we're abending.
o Always clean up our interface when the last link is gone rather than
delaying things 'till exit time in the -direct case (the interface
is useless anyway). Do this *after* slamming down our NCPs (if
they're still around).
o Our MP server descriptor now clears the relevent device descriptor
from our descriptor [fd]sets when a datalink is on death-row (to
be transferred to another running ppp), thus avoiding the possibility
of passing a bum descriptor to select() and having ppp abend.
o Handle the MP socket descriptor functions from within the bundle
descriptor functions. Now we ensure that the MP socket descriptor
functions see the descriptor sets *after* they've been seen by our
datalinks.
o Add/fix a few more comments.
Notes
Notes:
svn path=/cvs2svn/branches/MP/; revision=36076
Diffstat (limited to 'usr.sbin/ppp/datalink.c')
-rw-r--r-- | usr.sbin/ppp/datalink.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/usr.sbin/ppp/datalink.c b/usr.sbin/ppp/datalink.c index 286aaec45f50..e946465c18f3 100644 --- a/usr.sbin/ppp/datalink.c +++ b/usr.sbin/ppp/datalink.c @@ -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.59 1998/05/11 23:39:29 brian Exp $ + * $Id: datalink.c,v 1.1.2.60 1998/05/15 18:21:02 brian Exp $ */ #include <sys/types.h> @@ -301,15 +301,18 @@ datalink_UpdateSet(struct descriptor *d, fd_set *r, fd_set *w, fd_set *e, case DATALINK_LCP: case DATALINK_AUTH: case DATALINK_OPEN: - if (dl == dl->bundle->ncp.mp.server.send.dl) - /* Never read our descriptor if we're scheduled for transfer */ - r = NULL; result = descriptor_UpdateSet(&dl->physical->desc, r, w, e, n); break; } return result; } +int +datalink_RemoveFromSet(struct datalink *dl, fd_set *r, fd_set *w, fd_set *e) +{ + return physical_RemoveFromSet(dl->physical, r, w, e); +} + static int datalink_IsSet(struct descriptor *d, const fd_set *fdset) { @@ -453,7 +456,7 @@ datalink_AuthOk(struct datalink *dl) /* we've authenticated in multilink mode ! */ switch (mp_Up(&dl->bundle->ncp.mp, dl)) { case MP_LINKSENT: - /* We've handed the link off to another ppp ! */ + /* We've handed the link off to another ppp (well, we will soon) ! */ return; case MP_UP: /* First link in the bundle */ |