#19131: uci does not allow empty string as an option value
-----------------------+------------------------
 Reporter:  anonymous  |      Owner:  developers
     Type:  defect     |     Status:  new
 Priority:  normal     |  Milestone:
Component:  packages   |    Version:  Trunk
 Keywords:             |
-----------------------+------------------------
 {{{
 diff -rubp a/list.c b/list.c
 --- a/list.c    2014-12-25 14:24:52.000000000 +0100
 +++ b/list.c    2015-03-10 10:56:52.103593182 +0100
 @@ -679,7 +679,7 @@ int uci_set(struct uci_context *ctx, str
                 if (e)
                         ptr->o = uci_to_option(e);
         }
 -       if (!ptr->value[0]) {
 +       if (!ptr->value[0] && !ptr->o && !ptr->s) {
                 /* if setting a nonexistant option/section to a
 nonexistant value,
                  * exit without errors */
                 if (!(ptr->flags & UCI_LOOKUP_COMPLETE))
 }}}

--
Ticket URL: <https://dev.openwrt.org/ticket/19131>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to