Show our link name when we fail to mp_Up().

This commit is contained in:
Brian Somers 1998-04-25 00:09:22 +00:00
parent 50abd4c820
commit 184d1da22a
3 changed files with 11 additions and 10 deletions

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.46 1998/04/24 19:16:02 brian Exp $
* $Id: datalink.c,v 1.1.2.47 1998/04/25 00:09:09 brian Exp $
*/
#include <sys/types.h>
@ -454,7 +454,7 @@ datalink_AuthOk(struct datalink *dl)
/* XXX: Connect to another ppp instance HERE */
if (dl->physical->link.lcp.want_mrru && dl->physical->link.lcp.his_mrru) {
if (!mp_Up(&dl->bundle->ncp.mp, &dl->peer,
if (!mp_Up(&dl->bundle->ncp.mp, dl->name, &dl->peer,
dl->physical->link.lcp.want_mrru,
dl->physical->link.lcp.his_mrru,
dl->physical->link.lcp.want_shortseq,

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: mp.c,v 1.1.2.13 1998/04/24 19:16:09 brian Exp $
* $Id: mp.c,v 1.1.2.14 1998/04/24 19:16:20 brian Exp $
*/
#include <sys/types.h>
@ -192,20 +192,21 @@ mp_Init(struct mp *mp, struct bundle *bundle)
}
int
mp_Up(struct mp *mp, const struct peerid *peer, u_short local_mrru,
u_short peer_mrru, int local_shortseq, int peer_shortseq)
mp_Up(struct mp *mp, const char *name, const struct peerid *peer,
u_short local_mrru, u_short peer_mrru, int local_shortseq,
int peer_shortseq)
{
if (mp->active) {
/* We're adding a link - do a last validation on our parameters */
if (!peerid_Equal(peer, &mp->peer)) {
LogPrintf(LogPHASE, "Inappropriate peer !\n");
LogPrintf(LogPHASE, "%s: Inappropriate peer !\n", name);
return 0;
}
if (mp->local_mrru != local_mrru ||
mp->peer_mrru != peer_mrru ||
mp->local_is12bit != local_shortseq ||
mp->peer_is12bit != peer_shortseq) {
LogPrintf(LogPHASE, "Invalid MRRU/SHORTSEQ MP parameters !\n");
LogPrintf(LogPHASE, "%s: Invalid MRRU/SHORTSEQ MP parameters !\n", name);
return 0;
}
} else {

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: mp.h,v 1.1.2.5 1998/04/23 23:50:39 brian Exp $
* $Id: mp.h,v 1.1.2.6 1998/04/24 19:16:10 brian Exp $
*/
struct mbuf;
@ -93,8 +93,8 @@ struct mp_header {
extern void mp_Init(struct mp *, struct bundle *);
extern void mp_linkInit(struct mp_link *);
extern int mp_Up(struct mp *, const struct peerid *, u_short, u_short,
int, int);
extern int mp_Up(struct mp *, const char *, const struct peerid *, u_short,
u_short, int, int);
extern void mp_Down(struct mp *);
extern void mp_Input(struct mp *, struct mbuf *, struct physical *);
extern int mp_FillQueues(struct bundle *);