From 6dca3e6b72b8c754a27ef4550dfd492ea7b813f9 Mon Sep 17 00:00:00 2001 From: Sebastien Vincent Date: Fri, 3 Dec 2010 17:23:20 +0000 Subject: [PATCH] If we try to call an XMPP contact that does not support Jingle, print its address AND resource in error message. --- .../jabber/OperationSetBasicTelephonyJabberImpl.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java index ab316502e..7d2afb08c 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java @@ -218,14 +218,15 @@ CallPeerJabberImpl createOutgoingCall( Iterator it = getProtocolProvider().getConnection().getRoster().getPresences( calleeAddress); + String calleeURI = null; // choose the resource that has the highest priority AND support Jingle while(it.hasNext()) { Presence presence = it.next(); - String calleeURI = presence.getFrom(); int priority = (presence.getPriority() == Integer.MIN_VALUE) ? 0 : presence.getPriority(); + calleeURI = presence.getFrom(); try { @@ -266,15 +267,15 @@ CallPeerJabberImpl createOutgoingCall( if(di != null) { if (logger.isInfoEnabled()) - logger.info(calleeAddress + ": jingle supported "); + logger.info(fullCalleeURI + ": jingle supported "); } else { if (logger.isInfoEnabled()) - logger.info(calleeAddress + ": jingle not supported ?"); + logger.info(calleeURI + ": jingle not supported ?"); throw new OperationFailedException( "Failed to create OutgoingJingleSession.\n" - + calleeAddress + " does not support jingle", + + calleeURI + " does not support jingle", OperationFailedException.INTERNAL_ERROR); }