diff options
author | Amar Tumballi <amar@gluster.com> | 2011-02-25 08:38:44 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2011-03-01 02:05:51 -0800 |
commit | bf73fd2d8d6805a9a3b947464c65a9847442bba3 (patch) | |
tree | 261db5b8f1c4f1f1ec1a8c9323ab222049a265c0 /xlators/mgmt/glusterd/src/glusterd.c | |
parent | 36bd0291118dfee4df9d387eb94681d41a0abcbb (diff) |
glusterd: separate out cli specific programs and mgmt specific programs
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 2333 (make glusterd more rpc friendly)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2333
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c index 50092f987c3..675713585d5 100644 --- a/xlators/mgmt/glusterd/src/glusterd.c +++ b/xlators/mgmt/glusterd/src/glusterd.c @@ -48,6 +48,8 @@ static uuid_t glusterd_uuid; extern struct rpcsvc_program glusterd1_mop_prog; +extern struct rpcsvc_program gd_svc_mgmt_prog; +extern struct rpcsvc_program gd_svc_cli_prog; extern struct rpcsvc_program gluster_handshake_prog; extern struct rpcsvc_program gluster_pmap_prog; extern glusterd_op_info_t opinfo; @@ -352,16 +354,33 @@ init (xlator_t *this) goto out; } + ret = glusterd_program_register (this, rpc, &gd_svc_cli_prog); + if (ret) { + rpcsvc_program_unregister (rpc, &glusterd1_mop_prog); + goto out; + } + + ret = glusterd_program_register (this, rpc, &gd_svc_mgmt_prog); + if (ret) { + rpcsvc_program_unregister (rpc, &glusterd1_mop_prog); + rpcsvc_program_unregister (rpc, &gd_svc_cli_prog); + goto out; + } + ret = glusterd_program_register (this, rpc, &gluster_pmap_prog); if (ret) { rpcsvc_program_unregister (rpc, &glusterd1_mop_prog); + rpcsvc_program_unregister (rpc, &gd_svc_cli_prog); + rpcsvc_program_unregister (rpc, &gd_svc_mgmt_prog); goto out; } ret = glusterd_program_register (this, rpc, &gluster_handshake_prog); if (ret) { rpcsvc_program_unregister (rpc, &glusterd1_mop_prog); - rpcsvc_program_unregister (rpc, &gluster_handshake_prog); + rpcsvc_program_unregister (rpc, &gluster_pmap_prog); + rpcsvc_program_unregister (rpc, &gd_svc_cli_prog); + rpcsvc_program_unregister (rpc, &gd_svc_mgmt_prog); goto out; } |