Signed-off-by: Felix Fietkau <nbd@openwrt.org>
uloop_init();
- cl = uclient_new(argv[0], &cb);
+ cl = uclient_new(argv[0], NULL, &cb);
if (!cl) {
fprintf(stderr, "Failed to allocate uclient context\n");
return 1;
return NULL;
}
-struct uclient *uclient_new(const char *url_str, const struct uclient_cb *cb)
+struct uclient *uclient_new(const char *url_str, const char *auth_str, const struct uclient_cb *cb)
{
struct uclient *cl;
struct uclient_url *url;
- url = uclient_get_url(url_str, NULL);
+ url = uclient_get_url(url_str, auth_str);
if (!url)
return NULL;
void (*error)(struct uclient *cl, int code);
};
-struct uclient *uclient_new(const char *url, const struct uclient_cb *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_connect_url(struct uclient *cl, const char *url_str);