* Change the state of a control protocol in the state automaton. * Takes care of starting/stopping the restart timer. */
| 2079 | * Takes care of starting/stopping the restart timer. |
| 2080 | */ |
| 2081 | static void |
| 2082 | sppp_cp_change_state(const struct cp *cp, struct sppp *sp, int newstate) |
| 2083 | { |
| 2084 | sp->state[cp->protoidx] = newstate; |
| 2085 | |
| 2086 | callout_stop (&sp->ch[cp->protoidx]); |
| 2087 | |
| 2088 | switch (newstate) { |
| 2089 | case STATE_INITIAL: |
| 2090 | case STATE_STARTING: |
| 2091 | case STATE_CLOSED: |
| 2092 | case STATE_STOPPED: |
| 2093 | case STATE_OPENED: |
| 2094 | break; |
| 2095 | case STATE_CLOSING: |
| 2096 | case STATE_STOPPING: |
| 2097 | case STATE_REQ_SENT: |
| 2098 | case STATE_ACK_RCVD: |
| 2099 | case STATE_ACK_SENT: |
| 2100 | callout_reset(&sp->ch[cp->protoidx], sp->lcp.timeout, |
| 2101 | cp->TO, (void *)sp); |
| 2102 | break; |
| 2103 | } |
| 2104 | } |
| 2105 | |
| 2106 | /* |
| 2107 | *--------------------------------------------------------------------------* |
no outgoing calls
no test coverage detected