add uclient_get_url_filename helper function
[project/uclient.git] / uclient.c
index bcb7357..fb45069 100644 (file)
--- a/uclient.c
+++ b/uclient.c
@@ -223,6 +223,14 @@ int uclient_read(struct uclient *cl, char *buf, int len)
        return cl->backend->read(cl, buf, len);
 }
 
+void uclient_disconnect(struct uclient *cl)
+{
+       if (!cl->backend->disconnect)
+               return;
+
+       cl->backend->disconnect(cl);
+}
+
 static void __uclient_backend_change_state(struct uloop_timeout *timeout)
 {
        struct uclient *cl = container_of(timeout, struct uclient, timeout);