aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep/0065_socks5_bytestreams.vala
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp-vala/src/module/xep/0065_socks5_bytestreams.vala')
-rw-r--r--xmpp-vala/src/module/xep/0065_socks5_bytestreams.vala6
1 files changed, 5 insertions, 1 deletions
diff --git a/xmpp-vala/src/module/xep/0065_socks5_bytestreams.vala b/xmpp-vala/src/module/xep/0065_socks5_bytestreams.vala
index 1890aac3..a1be00d4 100644
--- a/xmpp-vala/src/module/xep/0065_socks5_bytestreams.vala
+++ b/xmpp-vala/src/module/xep/0065_socks5_bytestreams.vala
@@ -52,7 +52,11 @@ public class Module : XmppStreamModule, Iq.Handler {
}
string? host = stream_host.get_attribute("host");
string? jid_str = stream_host.get_attribute("jid");
- Jid? jid = jid_str != null ? Jid.parse(jid_str) : null;
+ Jid? jid = null;
+ try {
+ jid = jid_str != null ? new Jid(jid_str) : null;
+ } catch (InvalidJidError ignored) {
+ }
int port = stream_host.get_attribute_int("port");
if (host == null || jid == null || port <= 0 || port > 65535) {
return;