[Libreoffice-commits] online.git: Branch 'distro/collabora/milestone-7' - 2 commits - loleaflet/src loolwsd/LOOLWSD.cpp

Jan Holesovsky kendy at collabora.com
Thu Feb 4 19:41:28 UTC 2016


 loleaflet/src/map/Map.js |    5 +++++
 loolwsd/LOOLWSD.cpp      |    4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

New commits:
commit c5220d8bc6dea5ef46a48cb3e9416dde4716c80e
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Thu Feb 4 20:36:39 2016 +0100

    loleaflet: When the 'premission' is 'edit', request a session immediately.

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index c2ec720..4ea1448 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -72,6 +72,11 @@ L.Map = L.Evented.extend({
 		this._addLayers(this.options.layers);
 		this._socket = L.socket(this);
 
+		// when editing, we need the LOK session right away
+		if (options.permission === 'edit') {
+			this._socket.sendMessage('requestloksession');
+		}
+
 		// Inhibit the context menu - the browser thinks that the document
 		// is just a bunch of images, hence the context menu is useless (tdf#94599)
 		this.on('contextmenu', function() {});
commit d0f62b694e201b5d22ca2cd581244bc575a0cf5e
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Thu Feb 4 19:22:51 2016 +0100

    loolwsd: Use the default backlog size.

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index a1b9a48..7387d27 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -1425,7 +1425,7 @@ int LOOLWSD::main(const std::vector<std::string>& /*args*/)
 #endif
 
     // Start a server listening on the port for clients
-    ServerSocket svs(portNumber, _numPreSpawnedChildren*10);
+    ServerSocket svs(portNumber);
     ThreadPool threadPool(_numPreSpawnedChildren*2, MAX_SESSIONS);
     HTTPServer srv(new RequestHandlerFactory(), threadPool, svs, new HTTPServerParams);
 
@@ -1433,7 +1433,7 @@ int LOOLWSD::main(const std::vector<std::string>& /*args*/)
 
     // And one on the port for child processes
     SocketAddress addr2("127.0.0.1", MASTER_PORT_NUMBER);
-    ServerSocket svs2(addr2, _numPreSpawnedChildren);
+    ServerSocket svs2(addr2);
     ThreadPool threadPool2(_numPreSpawnedChildren*2, MAX_SESSIONS);
     HTTPServer srv2(new RequestHandlerFactory(), threadPool2, svs2, new HTTPServerParams);
 


More information about the Libreoffice-commits mailing list