You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by vn...@apache.org on 2018/09/26 12:44:31 UTC

[10/19] guacamole-server git commit: GUACAMOLE-623: Add configure test for LWS_CALLBACK_CLIENT_CLOSED (only defined in recent libwebsockets and required if present).

GUACAMOLE-623: Add configure test for LWS_CALLBACK_CLIENT_CLOSED (only defined in recent libwebsockets and required if present).


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/c5f67a31
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/c5f67a31
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/c5f67a31

Branch: refs/heads/master
Commit: c5f67a31dc6c803da23f70662befc102a9187855
Parents: ed56093
Author: Michael Jumper <mj...@apache.org>
Authored: Mon Sep 10 20:00:44 2018 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Tue Sep 25 21:30:51 2018 -0700

----------------------------------------------------------------------
 configure.ac                          | 10 ++++++++++
 src/protocols/kubernetes/kubernetes.c |  1 -
 2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/c5f67a31/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index ae78324..7c0bb73 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1193,6 +1193,16 @@ then
                  [have_libwebsockets=no])
 fi
 
+# Check for client-specific closed event, which must be used in favor of the
+# generic closed event if libwebsockets is recent enough to provide this
+if test "x$with_websockets" != "xno"
+then
+    AC_CHECK_DECL([LWS_CALLBACK_CLIENT_CLOSED],
+        [AC_DEFINE([HAVE_LWS_CALLBACK_CLIENT_CLOSED],,
+                   [Whether LWS_CALLBACK_CLIENT_CLOSED is defined])],,
+        [#include <libwebsockets.h>])
+fi
+
 AM_CONDITIONAL([ENABLE_WEBSOCKETS],
                [test "x${have_libwebsockets}"  = "xyes"])
 

http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/c5f67a31/src/protocols/kubernetes/kubernetes.c
----------------------------------------------------------------------
diff --git a/src/protocols/kubernetes/kubernetes.c b/src/protocols/kubernetes/kubernetes.c
index 380d1d3..9850c6d 100644
--- a/src/protocols/kubernetes/kubernetes.c
+++ b/src/protocols/kubernetes/kubernetes.c
@@ -268,7 +268,6 @@ static int guac_kubernetes_lws_callback(struct lws* wsi,
                 lws_callback_on_writable(wsi);
             break;
 
-        /* TODO: Add configure test */
 #ifdef HAVE_LWS_CALLBACK_CLIENT_CLOSED
         /* Connection closed (client-specific) */
         case LWS_CALLBACK_CLIENT_CLOSED: