hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmcc...@apache.org
Subject svn commit: r1603055 - in /hadoop/common/branches/HADOOP-10388/hadoop-native-core/src/main/native/rpc: protoc-gen-hrpc.cc proxy.c proxy.h
Date Tue, 17 Jun 2014 04:58:24 GMT
Author: cmccabe
Date: Tue Jun 17 04:58:24 2014
New Revision: 1603055

URL: http://svn.apache.org/r1603055
Log:
HADOOP-10706. Fix initialization of hrpc_sync_ctx (decstery via cmccabe)

Modified:
    hadoop/common/branches/HADOOP-10388/hadoop-native-core/src/main/native/rpc/protoc-gen-hrpc.cc
    hadoop/common/branches/HADOOP-10388/hadoop-native-core/src/main/native/rpc/proxy.c
    hadoop/common/branches/HADOOP-10388/hadoop-native-core/src/main/native/rpc/proxy.h

Modified: hadoop/common/branches/HADOOP-10388/hadoop-native-core/src/main/native/rpc/protoc-gen-hrpc.cc
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HADOOP-10388/hadoop-native-core/src/main/native/rpc/protoc-gen-hrpc.cc?rev=1603055&r1=1603054&r2=1603055&view=diff
==============================================================================
--- hadoop/common/branches/HADOOP-10388/hadoop-native-core/src/main/native/rpc/protoc-gen-hrpc.cc
(original)
+++ hadoop/common/branches/HADOOP-10388/hadoop-native-core/src/main/native/rpc/protoc-gen-hrpc.cc
Tue Jun 17 04:58:24 2014
@@ -381,12 +381,12 @@ private:
 "    uv_sem_wait(&ctx->sem);\n"
 "    if (ctx->err) {\n"
 "        err = ctx->err;\n"
-"        hrpc_release_sync_ctx(ctx);\n"
+"        hrpc_proxy_release_sync_ctx(ctx);\n"
 "        return err;\n"
 "    }\n"
 "    resp = $resp_ty_uscore$__unpack(NULL, ctx->resp.pb_len,\n"
 "                                                  ctx->resp.pb_base);\n"
-"    hrpc_release_sync_ctx(ctx);\n"
+"    hrpc_proxy_release_sync_ctx(ctx);\n"
 "    if (!resp) {\n"
 "        return hadoop_lerr_alloc(EINVAL,\n"
 "           \"$sync_call$: failed to parse response from server\");\n"

Modified: hadoop/common/branches/HADOOP-10388/hadoop-native-core/src/main/native/rpc/proxy.c
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HADOOP-10388/hadoop-native-core/src/main/native/rpc/proxy.c?rev=1603055&r1=1603054&r2=1603055&view=diff
==============================================================================
--- hadoop/common/branches/HADOOP-10388/hadoop-native-core/src/main/native/rpc/proxy.c (original)
+++ hadoop/common/branches/HADOOP-10388/hadoop-native-core/src/main/native/rpc/proxy.c Tue
Jun 17 04:58:24 2014
@@ -96,14 +96,14 @@ struct hrpc_sync_ctx *hrpc_proxy_alloc_s
     if (!ctx) {
         return NULL;
     }
+    memset(ctx, 0, sizeof(*ctx));
     if (uv_sem_init(&ctx->sem, 0)) {
         return NULL;
     }
-    memset(&ctx, 0, sizeof(ctx));
     return ctx;
 }
 
-void hrpc_release_sync_ctx(struct hrpc_sync_ctx *ctx)
+void hrpc_proxy_release_sync_ctx(struct hrpc_sync_ctx *ctx)
 {
     free(ctx->resp.base);
     uv_sem_destroy(&ctx->sem);

Modified: hadoop/common/branches/HADOOP-10388/hadoop-native-core/src/main/native/rpc/proxy.h
URL: http://svn.apache.org/viewvc/hadoop/common/branches/HADOOP-10388/hadoop-native-core/src/main/native/rpc/proxy.h?rev=1603055&r1=1603054&r2=1603055&view=diff
==============================================================================
--- hadoop/common/branches/HADOOP-10388/hadoop-native-core/src/main/native/rpc/proxy.h (original)
+++ hadoop/common/branches/HADOOP-10388/hadoop-native-core/src/main/native/rpc/proxy.h Tue
Jun 17 04:58:24 2014
@@ -141,7 +141,7 @@ struct hrpc_sync_ctx *hrpc_proxy_alloc_s
  *
  * @param proxy                 The sync context.
  */
-void hrpc_release_sync_ctx(struct hrpc_sync_ctx *ctx);
+void hrpc_proxy_release_sync_ctx(struct hrpc_sync_ctx *ctx);
 
 /**
  * A callback which synchronous RPCs can use.



Mime
View raw message