From 805eae17d6403ddeb15fef954d45c692aea987f4 Mon Sep 17 00:00:00 2001 From: nandika Date: Sun, 19 Jun 2011 05:25:59 +0000 Subject: http sender corrected to build wihtout ntlm support git-svn-id: http://svn.apache.org/repos/asf/axis/axis2/c/core/trunk@1137287 13f79535-47bb-0310-9956-ffa450edef68 --- src/core/transport/http/sender/http_sender.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'src/core/transport/http/sender') diff --git a/src/core/transport/http/sender/http_sender.c b/src/core/transport/http/sender/http_sender.c index afcd390..83076a4 100644 --- a/src/core/transport/http/sender/http_sender.c +++ b/src/core/transport/http/sender/http_sender.c @@ -2417,6 +2417,13 @@ axis2_http_sender_configure_http_ntlm_auth( axis2_http_simple_request_t * request, axis2_char_t * header_data) { + +#ifndef AXIS2_NTLM_ENABLED + AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NTLM is not enabled. Please consider building "\ + "Axis2/C enabling a ntlm client library"); + return AXIS2_FAILURE; +#else + axutil_property_t *http_auth_un = NULL; axutil_property_t *http_auth_pw = NULL; axutil_property_t *ntlm_auth_dm = NULL; @@ -2428,11 +2435,6 @@ axis2_http_sender_configure_http_ntlm_auth( axis2_char_t *domain = NULL; axis2_char_t *workstation = NULL; -#ifndef AXIS2_NTLM_ENABLED - AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NTLM is not enabled. Please consider building "\ - "Axis2/C enabling a ntlm client library"); - return AXIS2_FAILURE; -#endif http_auth_un = axis2_msg_ctx_get_property(msg_ctx, env, AXIS2_HTTP_AUTH_UNAME); http_auth_pw = axis2_msg_ctx_get_property(msg_ctx, env, AXIS2_HTTP_AUTH_PASSWD); @@ -2594,6 +2596,7 @@ axis2_http_sender_configure_http_ntlm_auth( return AXIS2_SUCCESS; } return AXIS2_FAILURE; +#endif } /* axis2_http_sender_configure_http_ntlm_auth */ static axis2_status_t @@ -2937,6 +2940,11 @@ axis2_http_sender_configure_proxy_ntlm_auth( axis2_http_simple_request_t * request, axis2_char_t * header_data) { +#ifndef AXIS2_NTLM_ENABLED + AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NTLM is not enabled. Please consider building "\ + "Axis2/C enabling a ntlm client library"); + return AXIS2_FAILURE; +#else axutil_property_t *proxy_auth_un = NULL; axutil_property_t *proxy_auth_pw = NULL; axutil_property_t *ntlm_auth_dm = NULL; @@ -2948,11 +2956,7 @@ axis2_http_sender_configure_proxy_ntlm_auth( axis2_char_t *domain = NULL; axis2_char_t *workstation = NULL; -#ifndef AXIS2_NTLM_ENABLED - AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NTLM is not enabled. Please consider building "\ - "Axis2/C enabling a ntlm client library"); - return AXIS2_FAILURE; -#endif + if(!header_data || !*header_data) return AXIS2_FAILURE; @@ -3135,6 +3139,7 @@ axis2_http_sender_configure_proxy_ntlm_auth( return AXIS2_SUCCESS; } return AXIS2_FAILURE; +#endif } /* configure_proxy_ntlm_auth */ #endif -- cgit v1.1-32-gdbae