[Spice-devel] [Spice-Gtk] SpiceSession: Create webdav even with NULL shared_dir

Javier Celaya javier.celaya at flexvdi.com
Fri May 3 16:52:00 UTC 2019


A phodav server created with a NULL shared dir is valid and
results in an error answer to all requests of the webdav channel,
instead of silently ignoring them.

This is better than just returning NULL from
spice_session_get_webdav_server because:
a) it crashes channel_webdav.c:start_client.
b) even if it did not crash, access to the shared dir from the guest
   would fail by timeout instead of immediately notifying of an error.
---
 src/spice-session.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/spice-session.c b/src/spice-session.c
index 04ba124..cbcd8c4 100644
--- a/src/spice-session.c
+++ b/src/spice-session.c
@@ -2813,10 +2813,6 @@ PhodavServer* spice_session_get_webdav_server(SpiceSession *session)
     static GMutex mutex;
 
     const gchar *shared_dir = spice_session_get_shared_dir(session);
-    if (shared_dir == NULL) {
-        SPICE_DEBUG("No shared dir set, not creating webdav server");
-        return NULL;
-    }
 
     g_mutex_lock(&mutex);
 
-- 
2.20.1



More information about the Spice-devel mailing list