fix whitespaces
[project/rpcd.git] / plugin.c
index 33266b3..687944d 100644 (file)
--- a/plugin.c
+++ b/plugin.c
@@ -1,7 +1,7 @@
 /*
  * rpcd - UBUS RPC server
  *
- *   Copyright (C) 2013 Jo-Philipp Wich <jow@openwrt.org>
+ *   Copyright (C) 2013-2014 Jo-Philipp Wich <jow@openwrt.org>
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +16,7 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#include "plugin.h"
+#include <rpcd/plugin.h>
 
 static struct blob_buf buf;
 
@@ -194,7 +194,7 @@ rpc_plugin_parse_signature(struct blob_attr *sig, struct ubus_method *method)
        struct blob_attr *attr;
        struct blobmsg_policy *policy = NULL;
 
-       if (!sig || blob_id(sig) != BLOBMSG_TYPE_TABLE)
+       if (!sig || blobmsg_type(sig) != BLOBMSG_TYPE_TABLE)
                return false;
 
        n_attr = 0;
@@ -213,7 +213,7 @@ rpc_plugin_parse_signature(struct blob_attr *sig, struct ubus_method *method)
 
                blobmsg_for_each_attr(attr, sig, rem)
                {
-                       type = blob_id(attr);
+                       type = blobmsg_type(attr);
 
                        if (type == BLOBMSG_TYPE_INT32)
                        {
@@ -401,8 +401,10 @@ out:
 static LIST_HEAD(plugins);
 
 static const struct rpc_daemon_ops ops = {
-       .access = rpc_session_access,
-       .exec   = rpc_exec,
+       .session_access     = rpc_session_access,
+       .session_create_cb  = rpc_session_create_cb,
+       .session_destroy_cb = rpc_session_destroy_cb,
+       .exec               = rpc_exec,
 };
 
 static int