[svn-commits] oej: branch 1.4 r65836 - in /branches/1.4: channels/chan_sip.c res/res_jabber.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Thu May 24 07:38:31 MST 2007


Author: oej
Date: Thu May 24 09:38:30 2007
New Revision: 65836

URL: http://svn.digium.com/view/asterisk?view=rev&rev=65836
Log:
Issue 8409 - phsultan - Fix "login" as component to jabber server.

Modified:
    branches/1.4/channels/chan_sip.c
    branches/1.4/res/res_jabber.c

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=65836&r1=65835&r2=65836
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Thu May 24 09:38:30 2007
@@ -1934,7 +1934,14 @@
 			usleep(1);
 			ast_mutex_lock(&pkt->owner->lock);
 		}
-		if (pkt->owner->owner) {
+		if (pkt->method == SIP_BYE) {
+			/* Ok, we're not getting answers on SIP BYE's. Who cares?
+		           let's take the call down anyway. */
+			if (pkt->owner->owner)
+				ast_channel_unlock(pkt->owner->owner);
+			append_history(pkt->owner, "ByeFailure", "Remote peer doesn't respond to bye. Destroying call anyway.");
+			ast_set_flag(&pkt->owner->flags[0], SIP_NEEDDESTROY);	
+		} if (pkt->owner->owner) {
 			sip_alreadygone(pkt->owner);
 			ast_log(LOG_WARNING, "Hanging up call %s - no reply to our critical packet.\n", pkt->owner->callid);
 			ast_queue_hangup(pkt->owner->owner);

Modified: branches/1.4/res/res_jabber.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/res/res_jabber.c?view=diff&rev=65836&r1=65835&r2=65836
==============================================================================
--- branches/1.4/res/res_jabber.c (original)
+++ branches/1.4/res/res_jabber.c Thu May 24 09:38:30 2007
@@ -1845,12 +1845,13 @@
 static int aji_component_initialize(struct aji_client *client)
 {
 	int connected = 1;
-	connected = iks_connect_via(client->p, client->jid->server, client->port, client->user);
+
+	connected = iks_connect_via(client->p, S_OR(client->serverhost, client->jid->server), client->port, client->user);
 	if (connected == IKS_NET_NOCONN) {
 		ast_log(LOG_ERROR, "JABBER ERROR: No Connection\n");
 		return IKS_HOOK;
 	} else if (connected == IKS_NET_NODNS) {
-		ast_log(LOG_ERROR, "JABBER ERROR: No DNS\n");
+		ast_log(LOG_ERROR, "JABBER ERROR: No DNS %s for client to  %s\n", client->name, S_OR(client->serverhost, client->jid->server));
 		return IKS_HOOK;
 	} else if (!connected) 
 		iks_recv(client->p, 30);



More information about the svn-commits mailing list