diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-05-04 19:54:22 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-05-04 19:55:13 +0200 |
commit | 29c798a52907b7ee28c8e001c99ceed65ebe5d39 (patch) | |
tree | 9a4c83a0e57a5dc8e69c3937e9ab0225c3346f5f /uclient.c | |
parent | f9d9e776e6378bfe24737d6c4a7573f3842c7a9b (diff) | |
download | uclient-29c798a52907b7ee28c8e001c99ceed65ebe5d39.tar.gz |
add uclient_disconnect() to force a disconnect without further callbacks
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'uclient.c')
-rw-r--r-- | uclient.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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); |