diff options
author | Alex Elder <elder@inktank.com> | 2012-05-16 22:16:39 +0200 |
---|---|---|
committer | Alex Elder <elder@dreamhost.com> | 2012-05-17 15:18:12 +0200 |
commit | 74f1869f76d043bad12ec03b4d5f04a8c3d1f157 (patch) | |
tree | fcce410d255e2660fc82532c70de1b2f60a956c6 /net/ceph/auth_none.c | |
parent | ceph: define ceph_auth_handshake type (diff) | |
download | linux-74f1869f76d043bad12ec03b4d5f04a8c3d1f157.tar.xz linux-74f1869f76d043bad12ec03b4d5f04a8c3d1f157.zip |
ceph: messenger: reduce args to create_authorizer
Make use of the new ceph_auth_handshake structure in order to reduce
the number of arguments passed to the create_authorizor method in
ceph_auth_client_ops. Use a local variable of that type as a
shorthand in the get_authorizer method definitions.
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'net/ceph/auth_none.c')
-rw-r--r-- | net/ceph/auth_none.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/net/ceph/auth_none.c b/net/ceph/auth_none.c index 214c2bb43d62..925ca583c09c 100644 --- a/net/ceph/auth_none.c +++ b/net/ceph/auth_none.c @@ -59,9 +59,7 @@ static int handle_reply(struct ceph_auth_client *ac, int result, */ static int ceph_auth_none_create_authorizer( struct ceph_auth_client *ac, int peer_type, - struct ceph_authorizer **a, - void **buf, size_t *len, - void **reply_buf, size_t *reply_len) + struct ceph_auth_handshake *auth) { struct ceph_auth_none_info *ai = ac->private; struct ceph_none_authorizer *au = &ai->au; @@ -82,11 +80,12 @@ static int ceph_auth_none_create_authorizer( dout("built authorizer len %d\n", au->buf_len); } - *a = (struct ceph_authorizer *)au; - *buf = au->buf; - *len = au->buf_len; - *reply_buf = au->reply_buf; - *reply_len = sizeof(au->reply_buf); + auth->authorizer = (struct ceph_authorizer *) au; + auth->authorizer_buf = au->buf; + auth->authorizer_buf_len = au->buf_len; + auth->authorizer_reply_buf = au->reply_buf; + auth->authorizer_reply_buf_len = sizeof (au->reply_buf); + return 0; bad2: |