From b3a307095b1e5444563be1ffd12484d233463aa7 Mon Sep 17 00:00:00 2001 From: "psyc://psyced.org/~lynX" <@> Date: Sat, 30 Jan 2010 23:39:47 +0100 Subject: [PATCH] handle dialback timeouts.. thx fip --- CHANGESTODO | 13 +++++++++++++ world/default/de/plain.textdb | 3 +++ world/default/en/plain.textdb | 3 +++ world/net/jabber/active.c | 2 ++ 4 files changed, 21 insertions(+) diff --git a/CHANGESTODO b/CHANGESTODO index 4273972..3226ab6 100644 --- a/CHANGESTODO +++ b/CHANGESTODO @@ -86,6 +86,15 @@ ________________________________________________________________________ ? should /load inform that errors go to the console? - the ~0 bug + i found a reliable way to reproduce this ~0 uni problem + - start psyced + - connect with a native psyc client + - kill psyced while the client is connected + - start psyced again + - connect with native psyc client + it will give you this ~0 uni then + until you connect with a telnet client + but it works again after you connect & disconnect w/ a telnet client ________________________________________________________________________ :_group psyc://psyced.org/@welcome :_source_identification psyc://xxx.no-ip.org/~xxx @@ -3976,3 +3985,7 @@ usercmd be negative, like -5. user - psyc client _examine was falling thru to _HTML output, added return; +=== 201001 ============================================================ +jabber/active ++ handle dialback timeouts, thx fip + diff --git a/world/default/de/plain.textdb b/world/default/de/plain.textdb index f35a39d..e938f9c 100644 --- a/world/default/de/plain.textdb +++ b/world/default/de/plain.textdb @@ -843,6 +843,9 @@ _failure_unsuccessful_delivery_resolve _failure_unsuccessful_delivery_self |Die Adresse [_host] zeigt auf [_source_origin], ist dort aber nicht vorgesehen. +_failure_unsuccessful_delivery_timeout_dialback +|Konnte kein XMPP dialback zu [_host] herstellen um [_method_relay] an [_source] auszuliefern. + _failure_unavailable_service |Solch ein Dienst wird hier derzeit nicht angeboten. diff --git a/world/default/en/plain.textdb b/world/default/en/plain.textdb index 1faa626..0d570fb 100644 --- a/world/default/en/plain.textdb +++ b/world/default/en/plain.textdb @@ -664,6 +664,9 @@ _failure_unsuccessful_delivery_resolve _failure_unsuccessful_delivery_self |The [_host] address points to [_source_origin] which however wasn't instructed to handle that. +_failure_unsuccessful_delivery_timeout_dialback +|Could not establish an XMPP dialback to [_host] to deliver a [_method_relay] to [_source]. + _failure_unavailable_service_version |Requesting version from [_nick_target] is not possible. diff --git a/world/net/jabber/active.c b/world/net/jabber/active.c index 0d3dea2..e28b068 100644 --- a/world/net/jabber/active.c +++ b/world/net/jabber/active.c @@ -72,6 +72,7 @@ start_dialback() { dialback_outgoing = 1; emit(sprintf("%s", hostname, source_host, key)); + call_out(120, #'connect_failure, "_timeout_dialback", "no dialback response received, timeout"); } process_dialback_queue() { @@ -364,6 +365,7 @@ jabberMsg(XMLNode node) { * we are originating server and are informed of the result */ dialback_outgoing = 0; + remove_call_out(#'connect_failure); if (node["@type"] == "valid") { #ifdef LOG_XMPP_AUTH D0( log_file("XMPP_AUTH", "\n%O auth dialback", ME); )