X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=http_send.c;h=429b4662a70497d522fd68a0e3467941e7edc959;hb=HEAD;hp=59fe2efa0419b0376201b236431fd2ea605273e2;hpb=bb899fb1a0c279a2890ff30d11bf7aec50fb92ed;p=paraslash.git diff --git a/http_send.c b/http_send.c index 59fe2efa..429b4662 100644 --- a/http_send.c +++ b/http_send.c @@ -158,7 +158,7 @@ static void http_send(long unsigned current_chunk, } } -static void http_post_select(__a_unused struct sched *s) +static void http_post_monitor(__a_unused struct sched *s) { struct sender_client *sc, *tmp; struct private_http_sender_data *phsd; @@ -170,7 +170,7 @@ static void http_post_select(__a_unused struct sched *s) 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) { @@ -191,12 +191,12 @@ static void http_post_select(__a_unused struct sched *s) 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; } -static void http_pre_select(struct sched *s) +static void http_pre_monitor(struct sched *s) { struct sender_client *sc, *tmp; unsigned n; @@ -274,8 +274,8 @@ const struct sender http_sender = { .name = "http", .init = http_send_init, .shutdown = http_shutdown, - .pre_select = http_pre_select, - .post_select = http_post_select, + .pre_monitor = http_pre_monitor, + .post_monitor = http_post_monitor, .send = http_send, .shutdown_clients = http_shutdown_clients, .client_cmds = {