freifunk-watchdog: copy with API change in latest uci
This commit is contained in:
parent
8d127fc6c5
commit
f01178a19a
1 changed files with 4 additions and 0 deletions
|
@ -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* ucix_init(const char *config_file)
|
||||||
{
|
{
|
||||||
struct uci_context *ctx = uci_alloc_context();
|
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");
|
uci_add_history_path(ctx, "/var/state");
|
||||||
|
#endif
|
||||||
if(uci_load(ctx, config_file, NULL) != UCI_OK)
|
if(uci_load(ctx, config_file, NULL) != UCI_OK)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in a new issue