From: Felix Fietkau Date: Sat, 29 Mar 2014 13:52:12 +0000 (+0100) Subject: add support for passing in auth to uclient_set_url() X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuclient.git;a=commitdiff_plain;h=438ebb9ce2bfd5cf3ab940667029c27346dc5160 add support for passing in auth to uclient_set_url() --- diff --git a/uclient.c b/uclient.c index 5b71bf4..2ac052d 100644 --- a/uclient.c +++ b/uclient.c @@ -132,12 +132,12 @@ struct uclient *uclient_new(const char *url_str, const char *auth_str, const str return cl; } -int uclient_set_url(struct uclient *cl, const char *url_str) +int uclient_set_url(struct uclient *cl, const char *url_str, const char *auth_str) { const struct uclient_backend *backend = cl->backend; struct uclient_url *url = cl->url; - url = uclient_get_url(url_str, NULL); + url = uclient_get_url(url_str, auth_str); if (!url) return -1; diff --git a/uclient.h b/uclient.h index 3520473..e8214c2 100644 --- a/uclient.h +++ b/uclient.h @@ -58,7 +58,7 @@ struct uclient_cb { struct uclient *uclient_new(const char *url, const char *auth_str, const struct uclient_cb *cb); void uclient_free(struct uclient *cl); -int uclient_set_url(struct uclient *cl, const char *url_str); +int uclient_set_url(struct uclient *cl, const char *url, const char *auth); int uclient_connect(struct uclient *cl); int uclient_read(struct uclient *cl, char *buf, int len);