summaryrefslogtreecommitdiffstats
path: root/Utilities/cmxmlrpc
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-03-03 20:52:31 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-03-03 20:52:31 (GMT)
commitb71410117ed1baf40ee6c0791ef06c1afe8fad36 (patch)
treed7faac23d332234f1a58ff1edb3b47b43d046756 /Utilities/cmxmlrpc
parent089d339721ac9e6ce4035171c4559f5915091ed1 (diff)
downloadCMake-b71410117ed1baf40ee6c0791ef06c1afe8fad36.zip
CMake-b71410117ed1baf40ee6c0791ef06c1afe8fad36.tar.gz
CMake-b71410117ed1baf40ee6c0791ef06c1afe8fad36.tar.bz2
COMP: Try to remove setenv warning
Diffstat (limited to 'Utilities/cmxmlrpc')
-rw-r--r--Utilities/cmxmlrpc/xmlrpc_authcookie.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Utilities/cmxmlrpc/xmlrpc_authcookie.c b/Utilities/cmxmlrpc/xmlrpc_authcookie.c
index 72c9d87..cee4147 100644
--- a/Utilities/cmxmlrpc/xmlrpc_authcookie.c
+++ b/Utilities/cmxmlrpc/xmlrpc_authcookie.c
@@ -37,6 +37,8 @@ void xmlrpc_authcookie_set ( xmlrpc_env *env,
const char *password ) {
char *unencoded;
xmlrpc_mem_block *token;
+ static char env_buffer[1024];
+ const char* block;
/* Check asserts. */
XMLRPC_ASSERT_ENV_OK(env);
@@ -56,8 +58,9 @@ void xmlrpc_authcookie_set ( xmlrpc_env *env,
/* Set HTTP_COOKIE_AUTH to the character representation of the
** encoded string. */
- setenv("HTTP_COOKIE_AUTH", XMLRPC_TYPED_MEM_BLOCK_CONTENTS(char, token),
- 1);
+ block = XMLRPC_TYPED_MEM_BLOCK_CONTENTS(char, token);
+ sprintf(env_buffer, "HTTP_COOKIE_AUTH=%s", block);
+ putenv(env_buffer);
cleanup:
if (token) xmlrpc_mem_block_free(token);