main: only purge uci savedirs if not reloading
[project/rpcd.git] / luci2.c
diff --git a/luci2.c b/luci2.c
index 276c60d..f136c56 100644 (file)
--- a/luci2.c
+++ b/luci2.c
@@ -34,7 +34,7 @@
 #include <libubus.h>
 #include <uci.h>
 
-#include "plugin.h"
+#include <rpcd/plugin.h>
 
 /* limit of log size buffer */
 #define RPC_LUCI2_MAX_LOGSIZE          (128 * 1024)
@@ -1998,16 +1998,16 @@ menu_access(struct blob_attr *sid, struct blob_attr *acls, struct blob_buf *e)
 
        blobmsg_for_each_attr(acl, acls, rem)
        {
-               if (!ops->access(blobmsg_data(sid), "luci-ui",
-                                blobmsg_data(acl), "read"))
+               if (!ops->session_access(blobmsg_data(sid), "luci-ui",
+                                        blobmsg_data(acl), "read"))
                {
                        rv = false;
                        break;
                }
 
                blobmsg_add_u8(e, blobmsg_data(acl),
-                              ops->access(blobmsg_data(sid), "luci-ui",
-                                          blobmsg_data(acl), "write"));
+                              ops->session_access(blobmsg_data(sid), "luci-ui",
+                                                  blobmsg_data(acl), "write"));
        }
 
        blobmsg_close_table(e, c);