nassh 0.8.22.4: Fix relayPrefix with explicit proxyHost.

Fix to use the correct relayHost in the event that the
relayPrefixField is in effect, but the prefix had already
been included in the proxyHost.

Change-Id: I0a189cf8e75b47eb60860debe992739ac65de841
Reviewed-on: https://chromium-review.googlesource.com/178429
Reviewed-by: Robert Ginda <rginda@chromium.org>
Tested-by: Robert Ginda <rginda@chromium.org>
diff --git a/nassh/doc/changelog.txt b/nassh/doc/changelog.txt
index b8364e2..3b9815d 100644
--- a/nassh/doc/changelog.txt
+++ b/nassh/doc/changelog.txt
@@ -1,3 +1,8 @@
+0.8.22.4, 2013-12-02, Relay fix.
+
+* Fix to use the correct relayHost in the event that the relayPrefixField is
+  in effect, but the prefix had already been included in the proxyHost.
+
 0.8.22.3, 2013-11-26, Learn the new relay dance.
 
 * Update the google relay code to understand the new proxy front-end to the
diff --git a/nassh/js/nassh_google_relay.js b/nassh/js/nassh_google_relay.js
index 1dd782f..7609534 100644
--- a/nassh/js/nassh_google_relay.js
+++ b/nassh/js/nassh_google_relay.js
@@ -183,6 +183,8 @@
             relayPrefix + '.') {
           // Only add the prefix if the proxyHost doesn't already include it.
           relayHost = relayPrefix + '.' + this.proxyHost;
+        } else {
+          relayHost = this.proxyHost;
         }
       } else {
         console.warn('Error getting relay prefix field: ' + relayPrefixField +
diff --git a/nassh/manifest.json b/nassh/manifest.json
index c23c6a7..73db395 100644
--- a/nassh/manifest.json
+++ b/nassh/manifest.json
@@ -4,7 +4,7 @@
   "manifest_version": 2,
   "content_security_policy": "script-src 'self'; object-src 'self'",
   "name": "Secure Shell (tot)",
-  "version": "0.8.22.3",
+  "version": "0.8.22.4",
   "default_locale": "en",
   "icons": {
     "128": "images/dev/icon-128.png",