You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by mj...@apache.org on 2017/06/07 00:32:29 UTC

[09/28] incubator-guacamole-client git commit: GUACAMOLE-102: Adding some commentary for changes in the RestrictedGuacamoleTunnelService class.

GUACAMOLE-102: Adding some commentary for changes in the RestrictedGuacamoleTunnelService class.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/2363c63e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/2363c63e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/2363c63e

Branch: refs/heads/master
Commit: 2363c63e6418d52d665ea79bec2f597145ee5021
Parents: d1259ef
Author: Nick Couchman <vn...@apache.org>
Authored: Mon Mar 20 14:55:35 2017 -0400
Committer: Nick Couchman <ni...@yahoo.com>
Committed: Mon Jun 5 15:34:21 2017 -0400

----------------------------------------------------------------------
 .../auth/jdbc/tunnel/RestrictedGuacamoleTunnelService.java       | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/2363c63e/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/RestrictedGuacamoleTunnelService.java
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/RestrictedGuacamoleTunnelService.java b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/RestrictedGuacamoleTunnelService.java
index 3db47c6..b41ec91 100644
--- a/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/RestrictedGuacamoleTunnelService.java
+++ b/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/RestrictedGuacamoleTunnelService.java
@@ -190,11 +190,15 @@ public class RestrictedGuacamoleTunnelService
                 logger.debug("Calculating weights for connections {} and {}.", a.getName(), b.getName());
                 int cw = 0;
                 int weightA = a.getConnectionWeight();
+                // If the weight is null, we go ahead and sort, anyway
                 if (weightA == null)
                     weightA = 0;
+
+                // If the weight is null, we go ahead and sort, anyway
                 int weightB = b.getConnectionWeight();
                 if (weightB == null)
                     weightB = 0;
+
                 int connsA = getActiveConnections(a).size();
                 int connsB = getActiveConnections(b).size();
                 logger.debug("Connection {} has computed weight of {}.", a.getName(), connsA * 10000 / weightA);