luci-mod-status: fix average calculations
[oweals/luci.git] / contrib / package / freifunk-watchdog / src / ucix.c
index 634d9e16c14bcfac36eb4134e2dde02228dd859f..f2f69fc369dc1ab98875cfd456b4f21a15eb8f66 100644 (file)
@@ -15,7 +15,7 @@
  *
  *   Copyright (C) 2008 John Crispin <blogic@openwrt.org> 
  *
- *   Changed by Jo-Philipp Wich <xm@subsignal.org>
+ *   Changed by Jo-Philipp Wich <jow@openwrt.org>
  */
 
 #include <string.h>
@@ -40,7 +40,11 @@ static inline int ucix_get_ptr(struct uci_context *ctx, const char *p, const cha
 struct uci_context* ucix_init(const char *config_file)
 {
        struct uci_context *ctx = uci_alloc_context();
+#ifdef uci_to_delta
+       uci_add_delta_path(ctx, "/var/state");
+#else
        uci_add_history_path(ctx, "/var/state");
+#endif
        if(uci_load(ctx, config_file, NULL) != UCI_OK)
        {
                return NULL;