Fixes searching for cusax capable provider.

sipgateway 5292
Damian Minkov 11 years ago
parent e0887ceb8e
commit c0c8d8d1ab

@ -1462,14 +1462,22 @@ public static String getPeerDisplayName(CallPeer peer,
OperationSetCusaxUtils.class);
if (cusaxProviders != null && cusaxProviders.size() > 0)
{
Iterator<ProtocolProviderService> iter
= cusaxProviders.iterator();
while(iter.hasNext())
{
Contact contact = getPeerContact(
peer,
cusaxProviders.iterator().next(),
iter.next(),
imppAddress);
displayName = (contact != null)
? contact.getDisplayName() : null;
if(!StringUtils.isNullOrEmpty(displayName, true))
break;
}
}
else
{
@ -1560,13 +1568,22 @@ public static byte[] getPeerImage(CallPeer peer)
OperationSetCusaxUtils.class);
if (cusaxProviders != null && cusaxProviders.size() > 0)
{
Iterator<ProtocolProviderService> iter
= cusaxProviders.iterator();
while(iter.hasNext())
{
Contact contact = getPeerContact(
peer,
cusaxProviders.iterator().next(),
iter.next(),
imppAddress);
image = (contact != null) ? getContactImage(contact) : null;
image = (contact != null) ?
getContactImage(contact) : null;
if(image != null)
break;
}
}
else
{
@ -1648,8 +1665,11 @@ else if(uiContact.getDescriptor() instanceof SourceContact)
if (cusaxProviders != null && cusaxProviders.size() > 0)
{
ProtocolProviderService cusaxProvider
= cusaxProviders.iterator().next();
Iterator<ProtocolProviderService> iter
= cusaxProviders.iterator();
while(iter.hasNext())
{
ProtocolProviderService cusaxProvider = iter.next();
Contact contact = getPeerContact(
peer,
@ -1664,6 +1684,7 @@ else if(uiContact.getDescriptor() instanceof SourceContact)
}
}
}
}
return null;
}
@ -1809,7 +1830,7 @@ private static byte[] getContactImage(Contact contact)
}
/**
* Returns the image for the given <tt>alternativePeerAddress</tt> by
* Returns the peer contact for the given <tt>alternativePeerAddress</tt> by
* checking the if the <tt>callPeer</tt> exists as a detail in the given
* <tt>cusaxProvider</tt>.
*
@ -1902,14 +1923,22 @@ else if(uiContact.getDescriptor() instanceof SourceContact)
OperationSetCusaxUtils.class);
if (cusaxProviders != null && cusaxProviders.size() > 0)
{
Iterator<ProtocolProviderService> iter
= cusaxProviders.iterator();
while(iter.hasNext())
{
Contact contact = getPeerContact(
peer,
cusaxProviders.iterator().next(),
iter.next(),
imppAddress);
return GuiActivator.getContactListService()
MetaContact res = GuiActivator.getContactListService()
.findMetaContactByContact(contact);
if(res != null)
return res;
}
}
else
{

Loading…
Cancel
Save