projects
/
oweals
/
uclient.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f619ebe
)
use the redirect function in the example code
author
Felix Fietkau
<nbd@openwrt.org>
Sat, 22 Mar 2014 23:29:31 +0000
(
00:29
+0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Sat, 22 Mar 2014 23:29:31 +0000
(
00:29
+0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
uclient-example.c
patch
|
blob
|
history
diff --git
a/uclient-example.c
b/uclient-example.c
index 05f344da2316bae4572c909018ae22cb3b5c823a..c8f0b1b7847dcab44bba4df7e9e7af6f139b6e2f 100644
(file)
--- a/
uclient-example.c
+++ b/
uclient-example.c
@@
-55,6
+55,14
@@
static void example_request_sm(struct uclient *cl)
static void example_eof(struct uclient *cl)
{
+ static int retries;
+
+ if (retries < 10 && uclient_http_redirect(cl)) {
+ retries++;
+ return;
+ }
+
+ retries = 0;
example_request_sm(cl);
}