cli: wait for incoming events on listen
authorFelix Fietkau <nbd@openwrt.org>
Sat, 5 Feb 2011 22:01:48 +0000 (23:01 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 5 Feb 2011 22:01:48 +0000 (23:01 +0100)
cli.c

diff --git a/cli.c b/cli.c
index ea1ec4da8f39fcb34c1b348e6eae867cc21f0b55..22fa7683bc401e28694777c532cbc8e188fe5ca8 100644 (file)
--- a/cli.c
+++ b/cli.c
@@ -62,6 +62,11 @@ static int ubus_cli_listen(struct ubus_context *ctx, int argc, char **argv)
                        event, ubus_strerror(ret));
        }
 
+       uloop_init();
+       ubus_add_uloop(ctx);
+       uloop_run();
+       uloop_done();
+
        return 0;
 }