From 60be2f671968002b09286ce738bad71e929830c2 Mon Sep 17 00:00:00 2001 From: Keith Sklower Date: Tue, 7 May 1991 01:11:14 -0800 Subject: [PATCH] change conventions on static routine, ``call_accepted''; have it call upper layers which invoked. SCCS-vsn: sys/netccitt/pk_input.c 7.10 --- usr/src/sys/netccitt/pk_input.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/usr/src/sys/netccitt/pk_input.c b/usr/src/sys/netccitt/pk_input.c index 48225fea0a..50195790a3 100644 --- a/usr/src/sys/netccitt/pk_input.c +++ b/usr/src/sys/netccitt/pk_input.c @@ -1,6 +1,6 @@ /* * Copyright (c) University of British Columbia, 1984 - * Copyright (c) 1990 The Regents of the University of California. + * Copyright (c) 1991 The Regents of the University of California. * All rights reserved. * * This code is derived from software contributed to Berkeley by @@ -206,7 +206,8 @@ struct x25config *xcp; * previous connect request is now complete. */ case CALL_ACCEPTED + SENT_CALL: - call_accepted (lcp, xp, m -> m_len); + MCHTYPE(m, MT_CONTROL); + call_accepted (lcp, m); break; /* @@ -230,7 +231,12 @@ struct x25config *xcp; lcp -> lcd_template = pk_template (lcp -> lcd_lcn, X25_CLEAR_CONFIRM); pk_output (lcp); pk_clearcause (pkp, xp); + if (lcp -> lcd_upper) { + MCHTYPE(m, MT_CONTROL); + lcp -> lcd_upper (lcp, m); + } pk_close (lcp); + lcp = 0; break; /* @@ -521,8 +527,7 @@ struct x25config *xcp; "packet arrived on unassigned lcn"); break; } - if (so == 0 && lcp && lcp -> lcd_upper && - (lcdstate == SENT_CALL || lcdstate == DATA_TRANSFER)) { + if (so == 0 && lcp && lcp -> lcd_upper && lcdstate == DATA_TRANSFER) { if (ptype != DATA && ptype != INTERRUPT) MCHTYPE(m, MT_CONTROL); lcp -> lcd_upper (lcp, m); @@ -709,12 +714,14 @@ struct socket *so; } static -call_accepted (lcp, xp, len) +call_accepted (lcp, m) struct pklcd *lcp; -struct x25_packet *xp; +struct mbuf *m; { register struct x25_calladdr *ap; register octet *fcp; + struct x25_packet *xp = mtod (m, struct x25_packet *); + int len = m -> m_len; lcp -> lcd_state = DATA_TRANSFER; if (lcp -> lcd_so) @@ -729,6 +736,8 @@ struct x25_packet *xp; parse_facilities (fcp, lcp -> lcd_ceaddr); } pk_assoc (lcp -> lcd_pkp, lcp, lcp -> lcd_ceaddr); + if (lcp -> lcd_so == 0 && lcp -> lcd_upper) + lcp -> lcd_upper(lcp, m); } static -- 2.20.1