config.change triggers should only run if the config is valid
authorJohn Crispin <blogic@openwrt.org>
Wed, 18 Dec 2013 12:59:16 +0000 (13:59 +0100)
committerJohn Crispin <blogic@openwrt.org>
Wed, 18 Dec 2013 13:01:33 +0000 (14:01 +0100)
Signed-off-by: John Crispin <blogic@openwrt.org>
uci.c

diff --git a/uci.c b/uci.c
index af154f735c2680f776bcb174f0dfa0c2877b9913..e0129988b1363b7967bc3b0a5cb367437898d6ec 100644 (file)
--- a/uci.c
+++ b/uci.c
@@ -1144,8 +1144,8 @@ rpc_uci_revert_commit(struct ubus_context *ctx, struct blob_attr *msg, bool comm
                {
                        uci_commit(cursor, &p, false);
                        uci_unload(cursor, p);
+                       rpc_uci_trigger_event(ctx, blobmsg_get_string(tb[RPC_C_CONFIG]));
                }
-               rpc_uci_trigger_event(ctx, blobmsg_get_string(tb[RPC_C_CONFIG]));
        }
        else
        {