summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server.c
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-06-29 05:36:30 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-07-01 03:31:51 -0700
commit01923eed1115e53c5be9fba3e72f75c7c631bf95 (patch)
treec1f1774247d8c25a9ced8c47ec416f63123591a2 /xlators/protocol/server/src/server.c
parentc46f8452d75e2f1b4ab77306177f39bdbb4b232c (diff)
minor fixes in rpc + protocol
* proper use of mem_acct_init in client.c/server.c * fentrylk_resume to be called instead of finodelk_resume in server_fentrylk(). * handle the case of xdr decoding failure on server by sending the proper error reply to client, so there is no missing frame. * removed unwanted functions from server-helpers.c Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
Diffstat (limited to 'xlators/protocol/server/src/server.c')
-rw-r--r--xlators/protocol/server/src/server.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
index bb9edab1328..104274edd02 100644
--- a/xlators/protocol/server/src/server.c
+++ b/xlators/protocol/server/src/server.c
@@ -474,6 +474,25 @@ out:
return 0;
}
+int32_t
+mem_acct_init (xlator_t *this)
+{
+ int ret = -1;
+
+ if (!this)
+ return ret;
+
+ ret = xlator_mem_acct_init (this, gf_server_mt_end + 1);
+
+ if (ret != 0) {
+ gf_log (this->name, GF_LOG_ERROR, "Memory accounting init"
+ "failed");
+ return ret;
+ }
+
+ return ret;
+}
+
int
init (xlator_t *this)
{
@@ -495,13 +514,6 @@ init (xlator_t *this)
goto out;
}
- ret = xlator_mem_acct_init (this, gf_server_mt_end + 1);
- if (ret) {
- gf_log (this->name, GF_LOG_ERROR,
- "Failed to Initialize memory accounting");
- goto out;
- }
-
conf = GF_CALLOC (1, sizeof (server_conf_t), gf_server_mt_server_conf_t);
GF_VALIDATE_OR_GOTO(this->name, conf, out);