X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=http_recv.c;h=636e224158a965ab68c0685c93411fe4767ea991;hp=3078c5fdf13a67599c65bc3b0c3fac4e8da4053f;hb=f8a941c97b6d0a891d0e075c4996d033a7db63bf;hpb=a5927501e41fa3fca2975452617474e78ffecc48 diff --git a/http_recv.c b/http_recv.c index 3078c5fd..636e2241 100644 --- a/http_recv.c +++ b/http_recv.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2009 Andre Noll + * Copyright (C) 2005-2010 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -116,12 +116,12 @@ static void http_recv_post_select(struct sched *s, struct task *t) phd->status = HTTP_SENT_GET_REQUEST; return; } - if (!FD_ISSET(phd->fd, &s->rfds)) - return; if (phd->status == HTTP_SENT_GET_REQUEST) { - ret = recv_pattern(phd->fd, HTTP_OK_MSG, strlen(HTTP_OK_MSG)); + ret = read_pattern(phd->fd, HTTP_OK_MSG, strlen(HTTP_OK_MSG), &s->rfds); if (ret < 0) goto err; + if (ret == 0) + return; PARA_INFO_LOG("received ok msg, streaming\n"); phd->status = HTTP_STREAMING; return;