X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuclient.git;a=blobdiff_plain;f=uclient.c;h=5f27ec9bb06782ff5633b3dc10b88c431fda9d09;hp=a5c416e3005eddd86fdc1728ea59afb4623e262b;hb=05df41f861b3b492221489423bc80360a21582da;hpb=66b4e5035104658ad54ef48a4d04e61cba8d4e01 diff --git a/uclient.c b/uclient.c index a5c416e..5f27ec9 100644 --- a/uclient.c +++ b/uclient.c @@ -106,6 +106,7 @@ struct uclient *uclient_new(const char *url_str, const struct uclient_cb *cb) int uclient_connect_url(struct uclient *cl, const char *url_str) { struct uclient_url *url = cl->url; + const struct uclient_backend *backend = cl->backend; if (url_str) { url = uclient_get_url(url_str); @@ -117,9 +118,12 @@ int uclient_connect_url(struct uclient *cl, const char *url_str) free(cl->url); cl->url = url; + + if (backend->update_url) + backend->update_url(cl); } - return cl->backend->connect(cl); + return backend->connect(cl); } void uclient_free(struct uclient *cl)