projects
/
project
/
rpcd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6b189b2
)
session: change "sid" attribute to "ubus_rpc_session", this ensures that exposed...
author
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 13 Sep 2013 12:52:35 +0000
(14:52 +0200)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 13 Sep 2013 12:52:35 +0000
(14:52 +0200)
session.c
patch
|
blob
|
history
diff --git
a/session.c
b/session.c
index 6d27ff6d253aecbc667b5330ac4901fcd0bf432f..e053979b87226fb57562440478a10e674d58e13a 100644
(file)
--- a/
session.c
+++ b/
session.c
@@
-44,7
+44,7
@@
static const struct blobmsg_policy new_policy = {
};
static const struct blobmsg_policy sid_policy = {
};
static const struct blobmsg_policy sid_policy = {
- .name = "
sid
", .type = BLOBMSG_TYPE_STRING
+ .name = "
ubus_rpc_session
", .type = BLOBMSG_TYPE_STRING
};
enum {
};
enum {
@@
-53,7
+53,7
@@
enum {
__RPC_SS_MAX,
};
static const struct blobmsg_policy set_policy[__RPC_SS_MAX] = {
__RPC_SS_MAX,
};
static const struct blobmsg_policy set_policy[__RPC_SS_MAX] = {
- [RPC_SS_SID] = { .name = "
sid
", .type = BLOBMSG_TYPE_STRING },
+ [RPC_SS_SID] = { .name = "
ubus_rpc_session
", .type = BLOBMSG_TYPE_STRING },
[RPC_SS_VALUES] = { .name = "values", .type = BLOBMSG_TYPE_TABLE },
};
[RPC_SS_VALUES] = { .name = "values", .type = BLOBMSG_TYPE_TABLE },
};
@@
-63,7
+63,7
@@
enum {
__RPC_SG_MAX,
};
static const struct blobmsg_policy get_policy[__RPC_SG_MAX] = {
__RPC_SG_MAX,
};
static const struct blobmsg_policy get_policy[__RPC_SG_MAX] = {
- [RPC_SG_SID] = { .name = "
sid
", .type = BLOBMSG_TYPE_STRING },
+ [RPC_SG_SID] = { .name = "
ubus_rpc_session
", .type = BLOBMSG_TYPE_STRING },
[RPC_SG_KEYS] = { .name = "keys", .type = BLOBMSG_TYPE_ARRAY },
};
[RPC_SG_KEYS] = { .name = "keys", .type = BLOBMSG_TYPE_ARRAY },
};
@@
-74,7
+74,7
@@
enum {
__RPC_SA_MAX,
};
static const struct blobmsg_policy acl_policy[__RPC_SA_MAX] = {
__RPC_SA_MAX,
};
static const struct blobmsg_policy acl_policy[__RPC_SA_MAX] = {
- [RPC_SA_SID] = { .name = "
sid
", .type = BLOBMSG_TYPE_STRING },
+ [RPC_SA_SID] = { .name = "
ubus_rpc_session
", .type = BLOBMSG_TYPE_STRING },
[RPC_SA_SCOPE] = { .name = "scope", .type = BLOBMSG_TYPE_STRING },
[RPC_SA_OBJECTS] = { .name = "objects", .type = BLOBMSG_TYPE_ARRAY },
};
[RPC_SA_SCOPE] = { .name = "scope", .type = BLOBMSG_TYPE_STRING },
[RPC_SA_OBJECTS] = { .name = "objects", .type = BLOBMSG_TYPE_ARRAY },
};
@@
-87,7
+87,7
@@
enum {
__RPC_SP_MAX,
};
static const struct blobmsg_policy perm_policy[__RPC_SP_MAX] = {
__RPC_SP_MAX,
};
static const struct blobmsg_policy perm_policy[__RPC_SP_MAX] = {
- [RPC_SP_SID] = { .name = "
sid
", .type = BLOBMSG_TYPE_STRING },
+ [RPC_SP_SID] = { .name = "
ubus_rpc_session
", .type = BLOBMSG_TYPE_STRING },
[RPC_SP_SCOPE] = { .name = "scope", .type = BLOBMSG_TYPE_STRING },
[RPC_SP_OBJECT] = { .name = "object", .type = BLOBMSG_TYPE_STRING },
[RPC_SP_FUNCTION] = { .name = "function", .type = BLOBMSG_TYPE_STRING },
[RPC_SP_SCOPE] = { .name = "scope", .type = BLOBMSG_TYPE_STRING },
[RPC_SP_OBJECT] = { .name = "object", .type = BLOBMSG_TYPE_STRING },
[RPC_SP_FUNCTION] = { .name = "function", .type = BLOBMSG_TYPE_STRING },
@@
-101,7
+101,7
@@
enum {
__RPC_DUMP_MAX,
};
static const struct blobmsg_policy dump_policy[__RPC_DUMP_MAX] = {
__RPC_DUMP_MAX,
};
static const struct blobmsg_policy dump_policy[__RPC_DUMP_MAX] = {
- [RPC_DUMP_SID] = { .name = "
sid
", .type = BLOBMSG_TYPE_STRING },
+ [RPC_DUMP_SID] = { .name = "
ubus_rpc_session
", .type = BLOBMSG_TYPE_STRING },
[RPC_DUMP_TIMEOUT] = { .name = "timeout", .type = BLOBMSG_TYPE_INT32 },
[RPC_DUMP_EXPIRES] = { .name = "expires", .type = BLOBMSG_TYPE_INT32 },
[RPC_DUMP_DATA] = { .name = "data", .type = BLOBMSG_TYPE_TABLE },
[RPC_DUMP_TIMEOUT] = { .name = "timeout", .type = BLOBMSG_TYPE_INT32 },
[RPC_DUMP_EXPIRES] = { .name = "expires", .type = BLOBMSG_TYPE_INT32 },
[RPC_DUMP_DATA] = { .name = "data", .type = BLOBMSG_TYPE_TABLE },
@@
-209,7
+209,7
@@
rpc_session_to_blob(struct rpc_session *ses, bool acls)
blob_buf_init(&buf, 0);
blob_buf_init(&buf, 0);
- blobmsg_add_string(&buf, "
sid
", ses->id);
+ blobmsg_add_string(&buf, "
ubus_rpc_session
", ses->id);
blobmsg_add_u32(&buf, "timeout", ses->timeout);
blobmsg_add_u32(&buf, "expires", uloop_timeout_remaining(&ses->t) / 1000);
blobmsg_add_u32(&buf, "timeout", ses->timeout);
blobmsg_add_u32(&buf, "expires", uloop_timeout_remaining(&ses->t) / 1000);