cli: flush stdout after printing an event

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
This commit is contained in:
Felix Fietkau 2015-05-12 16:56:09 +02:00
parent 38174a05a5
commit 2c30506a4f

1
cli.c
View file

@ -86,6 +86,7 @@ static void receive_event(struct ubus_context *ctx, struct ubus_event_handler *e
str = blobmsg_format_json(msg, true);
printf("{ \"%s\": %s }\n", type, str);
fflush(stdout);
free(str);
}