X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=modules%2Fppp.c;h=5e47a62b200776dd0d2baf959751a0ba2d7b2f81;hp=c99c1416c42d51caeec74df27546d40e5baf2d18;hb=9786230ddaa4428a4f2ad50be94bb288772a3d49;hpb=18de18edfb0ebefef8c0e2b0686e8793bc1ba127 diff --git a/modules/ppp.c b/modules/ppp.c index c99c141..5e47a62 100644 --- a/modules/ppp.c +++ b/modules/ppp.c @@ -24,7 +24,7 @@ * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, * OR MODIFICATIONS. * - * $Id: ppp.c,v 1.16 1999/02/26 10:52:06 paulus Exp $ + * $Id: ppp.c,v 1.18 1999/03/22 05:55:59 paulus Exp $ */ /* @@ -140,8 +140,8 @@ krwlock_t ppp_lower_lock; #define LOCK_LOWER_R 0 #define TRYLOCK_LOWER_R 1 #define UNLOCK_LOWER 0 -#define MUTEX_ENTER(x) 0 -#define MUTEX_EXIT(x) 0 +#define MT_ENTER(x) 0 +#define MT_EXIT(x) 0 #endif /* SOL2 */ @@ -468,7 +468,7 @@ pppclose(q, flag) #endif if (up->lowerq != 0) { /* Gack! the lower stream should have be unlinked earlier! */ - cmn_err(CE_WARN, "ppp%d: lower stream still connected on close?\n", + DPRINT1("ppp%d: lower stream still connected on close?\n", up->mn); LOCK_LOWER_W; up->lowerq->q_ptr = 0; @@ -1967,6 +1967,25 @@ ppplrput(q, mp) mblk_t *mp; { queue_t *uq; + struct iocblk *iop; + + switch (mp->b_datap->db_type) { + case M_IOCTL: + iop = (struct iocblk *) mp->b_rptr; + iop->ioc_error = EINVAL; + mp->b_datap->db_type = M_IOCNAK; + qreply(q, mp); + return 0; + case M_FLUSH: + if (*mp->b_rptr & FLUSHR) + flushq(q, FLUSHDATA); + if (*mp->b_rptr & FLUSHW) { + *mp->b_rptr &= ~FLUSHR; + qreply(q, mp); + } else + freemsg(mp); + return 0; + } /* * If we can't get the lower lock straight away, queue this one