HTTP_CONNECTED,
/** Successfully received the get request. */
HTTP_GOT_GET_REQUEST,
- /** We sent the OK message back to the client. */
- HTTP_SENT_OK_MSG,
/** Connection is ready for sending audio data. */
HTTP_STREAMING,
/** We didn't receive a valid get request. */
break;
case HTTP_GOT_GET_REQUEST: /* need to send ok msg */
if (hc->check_w && FD_ISSET(hc->fd, wfds)) {
- hc->status = HTTP_SENT_OK_MSG;
+ hc->status = HTTP_STREAMING;
http_send_ok_msg(hc);
}
break;
"invalid get request");
}
break;
- case HTTP_SENT_OK_MSG: /* need to send header? */
- if (hc->check_w && FD_ISSET(hc->fd, wfds))
- hc->status = HTTP_STREAMING;
- break;
}
}
if (!FD_ISSET(listen_fd, rfds))
para_fd_set(hc->fd, wfds, max_fileno);
hc->check_w = 1;
break;
- case HTTP_SENT_OK_MSG:
- if (!vss_playing())
- break; /* wait until server starts playing */
- para_fd_set(hc->fd, wfds, max_fileno);
- hc->check_w = 1;
- break;
}
}
}