ucimap: ignore unhandled data structure changes for now
[project/uci.git] / ucimap.c
index c2d78f0..e942333 100644 (file)
--- a/ucimap.c
+++ b/ucimap.c
@@ -388,13 +388,14 @@ ucimap_set_changed(void *section, void *field)
        struct uci_sectmap *sm = sd->sm;
        struct uci_optmap *om;
        int ofs = (char *)field - (char *)section;
-       int i;
+       int i = 0;
 
        ucimap_foreach_option(sm, om) {
                if (om->offset == ofs) {
                        SET_BIT(sd->cmap, i);
                        break;
                }
+               i++;
        }
 }
 
@@ -425,6 +426,9 @@ ucimap_store_section(struct uci_map *map, struct uci_package *p, void *section)
                static char buf[32];
                const char *str = NULL;
 
+               if (ucimap_is_list(om->type))
+                       continue;
+
                data = ucimap_get_data(sd, om);
                if (!TEST_BIT(sd->cmap, i))
                        continue;
@@ -442,6 +446,8 @@ ucimap_store_section(struct uci_map *map, struct uci_package *p, void *section)
                        sprintf(buf, "%d", !!data->b);
                        str = buf;
                        break;
+               default:
+                       continue;
                }
                ptr.value = str;