diff options
author | Craig Tiller <ctiller@google.com> | 2016-05-18 16:09:16 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-05-18 16:09:16 -0700 |
commit | 8517886c6a52d44aab151babae49f482e30f67fc (patch) | |
tree | e8d3ab9beebe3300db88757409f447a7e74eb605 /src/core/lib | |
parent | 5abe38bbe85706046cd8f77b1dab65eb412c86bd (diff) |
Move load_file into iomgr
Diffstat (limited to 'src/core/lib')
-rw-r--r-- | src/core/lib/iomgr/load_file.c (renamed from src/core/lib/support/load_file.c) | 6 | ||||
-rw-r--r-- | src/core/lib/iomgr/load_file.h (renamed from src/core/lib/support/load_file.h) | 4 | ||||
-rw-r--r-- | src/core/lib/security/credentials/google_default/google_default_credentials.c | 4 | ||||
-rw-r--r-- | src/core/lib/security/transport/security_connector.c | 6 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/core/lib/support/load_file.c b/src/core/lib/iomgr/load_file.c index a78bb33a0c..b62ecbc534 100644 --- a/src/core/lib/support/load_file.c +++ b/src/core/lib/iomgr/load_file.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/support/load_file.h" +#include "src/core/lib/iomgr/load_file.h" #include <errno.h> #include <string.h> @@ -43,8 +43,8 @@ #include "src/core/lib/support/block_annotate.h" #include "src/core/lib/support/string.h" -grpc_error *gpr_load_file(const char *filename, int add_null_terminator, - gpr_slice *output) { +grpc_error *grpc_load_file(const char *filename, int add_null_terminator, + gpr_slice *output) { unsigned char *contents = NULL; size_t contents_size = 0; gpr_slice result = gpr_empty_slice(); diff --git a/src/core/lib/support/load_file.h b/src/core/lib/iomgr/load_file.h index d4008a442f..961ef4867f 100644 --- a/src/core/lib/support/load_file.h +++ b/src/core/lib/iomgr/load_file.h @@ -46,8 +46,8 @@ extern "C" { /* Loads the content of a file into a slice. add_null_terminator will add a NULL terminator if non-zero. */ -grpc_error *gpr_load_file(const char *filename, int add_null_terminator, - gpr_slice *slice); +grpc_error *grpc_load_file(const char *filename, int add_null_terminator, + gpr_slice *slice); #ifdef __cplusplus } diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.c b/src/core/lib/security/credentials/google_default/google_default_credentials.c index 778773d6c8..29f818b8c8 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.c +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.c @@ -41,10 +41,10 @@ #include "src/core/lib/http/httpcli.h" #include "src/core/lib/http/parser.h" +#include "src/core/lib/iomgr/load_file.h" #include "src/core/lib/security/credentials/jwt/jwt_credentials.h" #include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" #include "src/core/lib/support/env.h" -#include "src/core/lib/support/load_file.h" #include "src/core/lib/support/string.h" #include "src/core/lib/surface/api_trace.h" @@ -169,7 +169,7 @@ static grpc_error *create_default_creds_from_path( error = GRPC_ERROR_CREATE("creds_path unset"); goto end; } - error = gpr_load_file(creds_path, 0, &creds_data); + error = grpc_load_file(creds_path, 0, &creds_data); if (error != GRPC_ERROR_NONE) { goto end; } diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c index 1803dbe824..03b64c5121 100644 --- a/src/core/lib/security/transport/security_connector.c +++ b/src/core/lib/security/transport/security_connector.c @@ -43,12 +43,12 @@ #include <grpc/support/string_util.h> #include "src/core/ext/transport/chttp2/alpn/alpn.h" +#include "src/core/lib/iomgr/load_file.h" #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/transport/handshake.h" #include "src/core/lib/security/transport/secure_endpoint.h" #include "src/core/lib/support/env.h" -#include "src/core/lib/support/load_file.h" #include "src/core/lib/support/string.h" #include "src/core/lib/tsi/fake_transport_security.h" #include "src/core/lib/tsi/ssl_transport_security.h" @@ -636,7 +636,7 @@ static gpr_slice compute_default_pem_root_certs_once(void) { gpr_getenv(GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR); if (default_root_certs_path != NULL) { GRPC_LOG_IF_ERROR("load_file", - gpr_load_file(default_root_certs_path, 0, &result)); + grpc_load_file(default_root_certs_path, 0, &result)); gpr_free(default_root_certs_path); } @@ -655,7 +655,7 @@ static gpr_slice compute_default_pem_root_certs_once(void) { if (GPR_SLICE_IS_EMPTY(result) && ovrd_res != GRPC_SSL_ROOTS_OVERRIDE_FAIL_PERMANENTLY) { GRPC_LOG_IF_ERROR("load_file", - gpr_load_file(installed_roots_path, 0, &result)); + grpc_load_file(installed_roots_path, 0, &result)); } return result; } |