srpt_set_ch_state
if (!srpt_set_ch_state(ch, CH_DRAINING)) {
if (srpt_set_ch_state(ch, CH_DISCONNECTED))
if (!srpt_set_ch_state(ch, CH_DISCONNECTING))
if (!srpt_set_ch_state(ch, CH_LIVE)) {
if (srpt_set_ch_state(ch, CH_DISCONNECTED))