Lines Matching refs:serverstate
139 chap_sstate(int serverstate)
144 if (serverstate < 0 || serverstate >= Dim(sstate)) {
145 (void) slprintf(buf, sizeof(buf), "#%d", serverstate);
148 return sstate[serverstate];
163 cstate->serverstate = CHAPSS_INITIAL;
217 if (cstate->serverstate == CHAPSS_INITIAL ||
218 cstate->serverstate == CHAPSS_PENDING) {
220 cstate->serverstate = CHAPSS_PENDING;
226 cstate->serverstate = CHAPSS_INITIAL_CHAL;
241 if (cstate->serverstate != CHAPSS_INITIAL_CHAL &&
242 cstate->serverstate != CHAPSS_RECHALLENGE)
248 cstate->serverstate = CHAPSS_BADAUTH;
284 if (cstate->serverstate != CHAPSS_OPEN)
289 cstate->serverstate = CHAPSS_RECHALLENGE;
309 if (cstate->serverstate == CHAPSS_INITIAL)
310 cstate->serverstate = CHAPSS_CLOSED;
311 else if (cstate->serverstate == CHAPSS_PENDING) {
314 cstate->serverstate = CHAPSS_INITIAL_CHAL;
331 if (cstate->serverstate == CHAPSS_INITIAL_CHAL ||
332 cstate->serverstate == CHAPSS_RECHALLENGE)
334 else if (cstate->serverstate == CHAPSS_OPEN
341 cstate->serverstate = CHAPSS_INITIAL;
354 if (cstate->serverstate != CHAPSS_INITIAL &&
355 cstate->serverstate != CHAPSS_CLOSED)
583 if (cstate->serverstate == CHAPSS_CLOSED ||
584 cstate->serverstate == CHAPSS_PENDING) {
587 chap_sstate(cstate->serverstate));
603 if (cstate->serverstate == CHAPSS_OPEN) {
609 if (cstate->serverstate == CHAPSS_BADAUTH) {
643 if (cstate->serverstate == CHAPSS_RECHALLENGE &&
695 old_state = cstate->serverstate;
696 cstate->serverstate = CHAPSS_OPEN;
708 (cstate->serverstate == CHAPSS_INITIAL_CHAL ? "" : "re"),
710 cstate->serverstate = CHAPSS_BADAUTH;