case HTTP_STREAMING: /* nothing to do */
break;
case HTTP_CONNECTED: /* need to recv get request */
- ret = read_pattern(sc->fd, HTTP_GET_MSG, MAXLINE);
+ ret = read_and_compare(sc->fd, HTTP_GET_MSG);
if (ret < 0)
phsd->status = HTTP_INVALID_GET_REQUEST;
else if (ret > 0) {
sc = accept_sender_client(hss);
if (!sc)
return;
- phsd = para_malloc(sizeof(*phsd));
+ phsd = alloc(sizeof(*phsd));
sc->private_data = phsd;
phsd->status = HTTP_CONNECTED;
}