You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by wl...@apache.org on 2016/11/30 09:18:10 UTC

incubator-hawq git commit: Fix bug on mac

Repository: incubator-hawq
Updated Branches:
  refs/heads/ranger f78b3e09c -> b22d20887


Fix bug on mac


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/b22d2088
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/b22d2088
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/b22d2088

Branch: refs/heads/ranger
Commit: b22d208872256dc6a192b7b930dbf819cd8b44cb
Parents: f78b3e0
Author: Wen Lin <wl...@pivotal.io>
Authored: Wed Nov 30 17:17:39 2016 +0800
Committer: Wen Lin <wl...@pivotal.io>
Committed: Wed Nov 30 17:17:39 2016 +0800

----------------------------------------------------------------------
 src/backend/libpq/rangerrest.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b22d2088/src/backend/libpq/rangerrest.c
----------------------------------------------------------------------
diff --git a/src/backend/libpq/rangerrest.c b/src/backend/libpq/rangerrest.c
index aacc4e0..032a6c0 100644
--- a/src/backend/libpq/rangerrest.c
+++ b/src/backend/libpq/rangerrest.c
@@ -153,7 +153,8 @@ json_object* create_ranger_request_json(char* user, AclObjectKind kind, char* ob
             char *first = NULL; // could be a database or protocol or tablespace
             char *second = NULL; // could be a schema or language
             char *third = NULL; // could be a table or sequence or function
-            for (int idx = 0, name = strtok_r(object, ".", &ptr);
+            int idx = 0;
+            for (name = strtok_r(object, ".", &ptr);
                  name;
                  name = strtok_r(NULL, ".", &ptr), idx++)
             {
@@ -267,8 +268,9 @@ void call_ranger_rest(CURL_HANDLE curl_handle, char* request)
     {
         goto _exit;
     }
+
     /* timeout */
-    curl_easy_setopt(curl_handle, CURLOPT_TIMEOUT, 1);
+    // curl_easy_setopt(curl_handle, CURLOPT_TIMEOUT, 1);
 
     /* specify URL to get */
     curl_easy_setopt(curl_handle->curl_handle, CURLOPT_URL, "http://localhost:8089/checkprivilege");