Lines Matching refs:sp

80 void TrashSession(sp)		/* (CCBPtr sp) */
81 CCBPtr sp;
84 sp->userFlags |= eTearDown;
85 sp->removing = 1;
86 sp->state = sClosed;
88 DoClose(sp, errAborted, 1);
105 CCBPtr sp;
107 sp = (CCBPtr)((Ptr)t - t->type); /* Recover stream pointer for this guy */
110 if (sp->sData) { /* If there's any data, flush it. */
111 sp->writeFlush = 1;
115 if (sp->waitingAck) {
117 sp->waitingAck = 0;
118 sp->sendSeq = sp->firstRtmtSeq;
119 sp->pktSendCnt = 0;
120 sp->resentData = 1; /* Had to resend data */
121 sp->noXmitFlow = 1; /* Don't incr. max packets. */
123 if ((sp->pktSendMax /= 2) == 0) /* Back off on max # packets
125 sp->pktSendMax = 1;
127 if ((sp->roundTrip *= 2) > sp->probeInterval)
128 sp->roundTrip = sp->probeInterval;
129 sp->rtmtInterval = sp->roundTrip + ((short)2 *
130 (short)sp->deviation);
134 if (sp->sapb) { /* Unacknowledged attn pkt */
135 sp->sendAttnData = 1;
139 if (sp->frpb) { /* Unacknowledged forward reset */
140 sp->sendCtl |= B_CTL_FRESET;
144 if (sp->state == sOpen || sp->state == sClosing) {
145 if (--sp->probeCntr == 0) { /* Connection died */
146 TrashSession(sp);
149 InsertTimerElem(&adspGlobal.slowTimers, &sp->ProbeTimer,
150 sp->probeInterval);
151 sp->sendCtl |= B_CTL_PROBE;
154 } else if (sp->state == sOpening) {
155 if ((sp->openState == O_STATE_OPENWAIT) ||
156 (sp->openState == O_STATE_ESTABLISHED))
158 if (--sp->openRetrys == 0) { /* Oops, didn't open */
159 sp->state = sClosed;
160 DoClose(sp, errOpening, 1);
165 sp->sendCtl |= (sp->openState == O_STATE_OPENWAIT) ?
180 CheckSend(sp);