From 5efdadab3e802035a5dcf6447c79276b75f6d0bb Mon Sep 17 00:00:00 2001 From: "psyc://psyced.org/~lynX" <@> Date: Sun, 14 Feb 2010 16:35:59 +0100 Subject: [PATCH] connectTimeOut for xmpp --- CHANGESTODO | 2 +- world/net/jabber/active.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGESTODO b/CHANGESTODO index 3226ab6..6fd7ffa 100644 --- a/CHANGESTODO +++ b/CHANGESTODO @@ -338,6 +338,7 @@ ________________________________________________________________________ been redirected using SRV. x-net.hu's A record is still being checked. _psyc._tcp.x-net.hu has SRV record 0 0 14404 psyc.x-net.hu. ++ XEP-0227: Portable Import/Export Format for XMPP-IM Servers ________________________________________________________________________ == MINOR DELEGATES ===================================================== ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ @@ -1040,7 +1041,6 @@ ________________________________________________________________________ - wenn man im client einen alias ("name" feld im xml code) setzt beim buddymachen, dann geht der im laufe der transaktion verloren und man muss ihn später nochmal setzen! - ________________________________________________________________________ == JABBER FILE TRANSFERS =============================================== ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ diff --git a/world/net/jabber/active.c b/world/net/jabber/active.c index e28b068..b2505cb 100644 --- a/world/net/jabber/active.c +++ b/world/net/jabber/active.c @@ -61,6 +61,13 @@ removeGateway(gw, id) { } } +static connectTimeOut() { + // should we do something more or else here? + remove_interactive(ME); + connect_failure("_timeout_dialback", + "no dialback response received, timeout"); +} + start_dialback() { string source_host, key; @@ -72,7 +79,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"); + call_out(#'connectTimeOut, 120); } process_dialback_queue() { @@ -365,7 +372,7 @@ jabberMsg(XMLNode node) { * we are originating server and are informed of the result */ dialback_outgoing = 0; - remove_call_out(#'connect_failure); + remove_call_out(#'connectTimeOut); if (node["@type"] == "valid") { #ifdef LOG_XMPP_AUTH D0( log_file("XMPP_AUTH", "\n%O auth dialback", ME); )