[Libreoffice-commits] online.git: 3 commits - loolwsd/Admin.cpp loolwsd/configure.ac loolwsd/IoUtil.cpp
Tor Lillqvist
tml at collabora.com
Fri Apr 8 11:36:07 UTC 2016
loolwsd/Admin.cpp | 2 +-
loolwsd/IoUtil.cpp | 5 +++--
loolwsd/configure.ac | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
New commits:
commit cc4791ec49a1fc2cb863ded9d60b6f1bd4823802
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri Apr 8 14:35:17 2016 +0300
It is customary to define ENABLE_FOO as 1
diff --git a/loolwsd/configure.ac b/loolwsd/configure.ac
index 8878c16..7f0c2f8 100644
--- a/loolwsd/configure.ac
+++ b/loolwsd/configure.ac
@@ -153,7 +153,7 @@ AS_IF([test "$enable_tests" != "no"],
[PKG_CHECK_MODULES([CPPUNIT], [cppunit])])
AS_IF([test "$enable_ssl" != "no"],
- [AC_DEFINE([ENABLE_SSL],[],[Enable SSL])])
+ [AC_DEFINE([ENABLE_SSL],1,[Enable SSL])])
LIBS="$LIBS -lPocoNet${POCO_DEBUG_SUFFIX} -lPocoUtil${POCO_DEBUG_SUFFIX} -lPocoJSON${POCO_DEBUG_SUFFIX} -lPocoFoundation${POCO_DEBUG_SUFFIX} -lPocoXML${POCO_DEBUG_SUFFIX} -lPocoNetSSL${POCO_DEBUG_SUFFIX} -lPocoCrypto${POCO_DEBUG_SUFFIX}"
commit 3b5f126b895c4c0b71bcbc999d740211dede646c
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri Apr 8 14:30:48 2016 +0300
Typo
diff --git a/loolwsd/Admin.cpp b/loolwsd/Admin.cpp
index 9c8e9aa..4a3ded3 100644
--- a/loolwsd/Admin.cpp
+++ b/loolwsd/Admin.cpp
@@ -353,7 +353,7 @@ void AdminRequestHandler::handleRequest(HTTPServerRequest& request, HTTPServerRe
}
catch(const Poco::Net::NotAuthenticatedException& exc)
{
- Log::info("Admin::NotAuthneticated");
+ Log::info("Admin::NotAuthenticated");
response.set("WWW-Authenticate", "Basic realm=\"online\"");
response.setStatus(HTTPResponse::HTTP_UNAUTHORIZED);
response.setContentLength(0);
commit cc166639ef3e972d317316b15dbdf5d9c02df1bd
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri Apr 8 14:25:42 2016 +0300
For more safety (?), catch Poco::Exception in general, not just IOException
Also, display more information about the exception.
Actually I think I should factor out the code to display as much
information as possible from an exception. Currently the amount of
information displayed varies from case to case in the code-base.
diff --git a/loolwsd/IoUtil.cpp b/loolwsd/IoUtil.cpp
index 35a8e24..3d8b87b 100644
--- a/loolwsd/IoUtil.cpp
+++ b/loolwsd/IoUtil.cpp
@@ -196,10 +196,11 @@ void shutdownWebSocket(std::shared_ptr<Poco::Net::WebSocket> ws)
if (ws)
ws->shutdown();
}
- catch (const Poco::IOException& exc)
+ catch (const Poco::Exception& exc)
{
- Log::warn("Util::shutdownWebSocket: IOException: " + exc.message());
+ Log::warn("Util::shutdownWebSocket: Exception: " + exc.displayText() + (exc.nested() ? " (" + exc.nested()->displayText() + ")" : ""));
}
+
}
ssize_t writeFIFO(int pipe, const char* buffer, ssize_t size)
More information about the Libreoffice-commits
mailing list