aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip
diff options
context:
space:
mode:
authorDamian Minkov <damencho@jitsi.org>2010-11-09 11:13:20 +0000
committerDamian Minkov <damencho@jitsi.org>2010-11-09 11:13:20 +0000
commit4f646deee90632ede047475eb57b9e8aa9b1bdfa (patch)
treeabf6774870c98ec17a1e8ddb904f0e98ad808af3 /src/net/java/sip
parent4feb099e8a51154e0d74597709f86a258c8ab5e9 (diff)
downloadjitsi-4f646deee90632ede047475eb57b9e8aa9b1bdfa.zip
jitsi-4f646deee90632ede047475eb57b9e8aa9b1bdfa.tar.gz
jitsi-4f646deee90632ede047475eb57b9e8aa9b1bdfa.tar.bz2
Windows icon with higher resolution.
Filter duplicating events on message wiating indication. Jabber sometimes shows "apos;" instead of "'", must be fixed now.
Diffstat (limited to 'src/net/java/sip')
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java15
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/OperationSetMessageWaitingSipImpl.java35
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderServiceSipImpl.java3
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/SipStackSharing.java7
4 files changed, 60 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java
index 753830e..db46f91 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java
@@ -498,7 +498,16 @@ public class OperationSetBasicInstantMessagingJabberImpl
OperationSetPersistentPresence.class);
if(smackMessageListener == null)
+ {
smackMessageListener = new SmackMessageListener();
+ }
+ else
+ {
+ // make sure this listener is not already installed in this
+ // connection
+ jabberProvider.getConnection()
+ .removePacketListener(smackMessageListener);
+ }
jabberProvider.getConnection().addPacketListener(
smackMessageListener,
@@ -633,6 +642,12 @@ public class OperationSetBasicInstantMessagingJabberImpl
// removes body end tag
.replaceAll("\\</[bB][oO][dD][yY].*?>","");
+ // for some reason &apos; is not rendered correctly
+ // from our ui, lets use its equivalent. Other
+ // similar chars(< > & ") seem ok.
+ receivedMessage =
+ receivedMessage.replaceAll("&apos;", "&#39;");
+
newMessage =
createMessage(receivedMessage, HTML_MIME_TYPE);
}
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetMessageWaitingSipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetMessageWaitingSipImpl.java
index 2e15fc1..e0b0793 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetMessageWaitingSipImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetMessageWaitingSipImpl.java
@@ -81,6 +81,22 @@ public class OperationSetMessageWaitingSipImpl
messageWaitingNotificationListeners
= new HashMap<MessageType,
List<MessageWaitingListener>>();
+ /**
+ * Number of unread messages, count so we don't duplicate events.
+ */
+ private int unreadMessages = 0;
+ /**
+ * Number of old messages, count so we don't duplicate events.
+ */
+ private int readMessages = 0;
+ /**
+ * Number of unread urgent messages, count so we don't duplicate events.
+ */
+ private int unreadUrgentMessages = 0;
+ /**
+ * Number of old urgent messages, count so we don't duplicate events.
+ */
+ private int readUrgentMessages = 0;
/**
* Creates this operation set.
@@ -238,6 +254,25 @@ public class OperationSetMessageWaitingSipImpl
int unreadUrgentMessages,
int readUrgentMessages)
{
+ synchronized(this)
+ {
+ if(this.unreadMessages == unreadMessages
+ && this.readMessages == readMessages
+ && this.unreadUrgentMessages == unreadUrgentMessages
+ && this.readUrgentMessages == readUrgentMessages)
+ {
+ // no new information skip event;
+ return;
+ }
+ else
+ {
+ this.unreadMessages = unreadMessages;
+ this.readMessages = readMessages;
+ this.unreadUrgentMessages = unreadUrgentMessages;
+ this.readUrgentMessages = readUrgentMessages;
+ }
+ }
+
MessageType msgType = MessageType.valueOfByType(msgTypeStr);
MessageWaitingEvent event =
new MessageWaitingEvent(
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderServiceSipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderServiceSipImpl.java
index efe4cd0..e874893 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderServiceSipImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/ProtocolProviderServiceSipImpl.java
@@ -2022,6 +2022,9 @@ public class ProtocolProviderServiceSipImpl
}
}
+ if(proxySocketAddress == null)
+ throw new UnknownHostException();
+
proxyAddress = proxySocketAddress.getAddress();
proxyPort = proxySocketAddress.getPort();
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/SipStackSharing.java b/src/net/java/sip/communicator/impl/protocol/sip/SipStackSharing.java
index fba597c..9f85d4f 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/SipStackSharing.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/SipStackSharing.java
@@ -1075,7 +1075,14 @@ public class SipStackSharing
return;
}
}
+ }
+ catch(Throwable ex)
+ {
+ logger.warn("Cannot apply incoming request modification!", ex);
+ }
+ try
+ {
// using asterisk voice mail initial notify for messages
// is ok, but on the fly received messages their notify comes
// without subscription-state, so we add it in order to be able to