projects
/
paraslash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
afs: Use nonblocking API for server commands.
[paraslash.git]
/
http_recv.c
diff --git
a/http_recv.c
b/http_recv.c
index 035d1f1908f9f176689fb5a51501d8b788372c17..636e224158a965ab68c0685c93411fe4767ea991 100644
(file)
--- a/
http_recv.c
+++ b/
http_recv.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 2005-20
09
Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-20
10
Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
*
* 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;
}
phd->status = HTTP_SENT_GET_REQUEST;
return;
}
- if (!FD_ISSET(phd->fd, &s->rfds))
- return;
if (phd->status == HTTP_SENT_GET_REQUEST) {
if (phd->status == HTTP_SENT_GET_REQUEST) {
- ret = re
cv_pattern(phd->fd, HTTP_OK_MSG, strlen(HTTP_OK_MSG)
);
+ ret = re
ad_pattern(phd->fd, HTTP_OK_MSG, strlen(HTTP_OK_MSG), &s->rfds
);
if (ret < 0)
goto err;
if (ret < 0)
goto err;
+ if (ret == 0)
+ return;
PARA_INFO_LOG("received ok msg, streaming\n");
phd->status = HTTP_STREAMING;
return;
PARA_INFO_LOG("received ok msg, streaming\n");
phd->status = HTTP_STREAMING;
return;
@@
-165,8
+165,8
@@
static int http_recv_open(struct receiver_node *rn)
{
struct private_http_recv_data *phd;
struct http_recv_args_info *conf = rn->conf;
{
struct private_http_recv_data *phd;
struct http_recv_args_info *conf = rn->conf;
- int fd, ret =
makesock(AF_UNSPEC, IPPROTO_TCP, 0
, conf->host_arg,
- conf->port_arg);
+ int fd, ret =
para_connect_simple(IPPROTO_TCP
, conf->host_arg,
+
conf->port_arg);
if (ret < 0)
return ret;
if (ret < 0)
return ret;
@@
-186,6
+186,7
@@
static int http_recv_open(struct receiver_node *rn)
static void http_recv_free_config(void *conf)
{
http_recv_cmdline_parser_free(conf);
static void http_recv_free_config(void *conf)
{
http_recv_cmdline_parser_free(conf);
+ free(conf);
}
/**
}
/**