diff options
Diffstat (limited to 'ucb/source/ucp/webdav-neon/NeonSession.cxx')
-rw-r--r-- | ucb/source/ucp/webdav-neon/NeonSession.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ucb/source/ucp/webdav-neon/NeonSession.cxx b/ucb/source/ucp/webdav-neon/NeonSession.cxx index 46a60b4d179e..c178c1e90238 100644 --- a/ucb/source/ucp/webdav-neon/NeonSession.cxx +++ b/ucb/source/ucp/webdav-neon/NeonSession.cxx @@ -32,6 +32,7 @@ #include <string.h> #include <sal/log.hxx> #include <osl/diagnose.h> +#include <osl/thread.h> #include <osl/time.h> #include <ne_socket.h> #include <ne_auth.h> @@ -1826,8 +1827,8 @@ void NeonSession::HandleError( int nError, case NE_ERROR: // Generic error { - OUString aText = OUString::createFromAscii( - ne_get_error( m_pHttpSession ) ); + const char* sErr = ne_get_error(m_pHttpSession); + OUString aText(sErr, strlen(sErr), osl_getThreadTextEncoding()); sal_uInt16 code = makeStatusCode( aText ); @@ -1987,9 +1988,9 @@ void NeonSession::HandleError( int nError, default: { SAL_WARN( "ucb.ucp.webdav", "Unknown Neon error code!" ); + const char* sErr = ne_get_error(m_pHttpSession); throw DAVException( DAVException::DAV_HTTP_ERROR, - OUString::createFromAscii( - ne_get_error( m_pHttpSession ) ) ); + OUString(sErr, strlen(sErr), osl_getThreadTextEncoding()) ); } } } |