diff options
author | Damian Minkov <damencho@jitsi.org> | 2011-08-24 10:24:15 +0000 |
---|---|---|
committer | Damian Minkov <damencho@jitsi.org> | 2011-08-24 10:24:15 +0000 |
commit | 25053ad5b7e0ebcb03094b769da954fccad9fb98 (patch) | |
tree | 650346d75b2f0397a64dc8e628be216fe28d0f3d /src/net/java/sip | |
parent | 3ee406cbf5dcf9c6574e7386f97727780f56dcef (diff) | |
download | jitsi-25053ad5b7e0ebcb03094b769da954fccad9fb98.zip jitsi-25053ad5b7e0ebcb03094b769da954fccad9fb98.tar.gz jitsi-25053ad5b7e0ebcb03094b769da954fccad9fb98.tar.bz2 |
Removes some warnings. Improves handling of wake up and error handling when using network manager.
Diffstat (limited to 'src/net/java/sip')
-rw-r--r-- | src/net/java/sip/communicator/impl/netaddr/NetworkConfigurationWatcher.java | 13 | ||||
-rw-r--r-- | src/net/java/sip/communicator/impl/sysactivity/NetworkManagerListenerImpl.java | 12 |
2 files changed, 24 insertions, 1 deletions
diff --git a/src/net/java/sip/communicator/impl/netaddr/NetworkConfigurationWatcher.java b/src/net/java/sip/communicator/impl/netaddr/NetworkConfigurationWatcher.java index ab0a188..89208a3 100644 --- a/src/net/java/sip/communicator/impl/netaddr/NetworkConfigurationWatcher.java +++ b/src/net/java/sip/communicator/impl/netaddr/NetworkConfigurationWatcher.java @@ -293,6 +293,19 @@ public class NetworkConfigurationWatcher { try { + // when waking up and there are no interfaces + // give time for devices to come up fully + // before checking with them + if(activeInterfaces.size() == 0) + { + synchronized(this) + { + try{ + wait(1000); + }catch(InterruptedException ex){} + } + } + Enumeration<NetworkInterface> e = NetworkInterface.getNetworkInterfaces(); diff --git a/src/net/java/sip/communicator/impl/sysactivity/NetworkManagerListenerImpl.java b/src/net/java/sip/communicator/impl/sysactivity/NetworkManagerListenerImpl.java index d13b327..7260701 100644 --- a/src/net/java/sip/communicator/impl/sysactivity/NetworkManagerListenerImpl.java +++ b/src/net/java/sip/communicator/impl/sysactivity/NetworkManagerListenerImpl.java @@ -67,8 +67,13 @@ public class NetworkManagerListenerImpl /**
* Starts
*/
+ @SuppressWarnings("unchecked")
public void start()
{
+ // on error connecting to dbus do nothing
+ if(dbusConn == null)
+ return;
+
try
{
dbusConn.addSigHandler(DBus.NameOwnerChanged.class, this);
@@ -83,8 +88,13 @@ public class NetworkManagerListenerImpl /**
* Stops.
*/
+ @SuppressWarnings("unchecked")
public void stop()
{
+ // on error connecting to dbus do nothing
+ if(dbusConn == null)
+ return;
+
try
{
dbusConn.removeSigHandler(DBus.NameOwnerChanged.class, this);
@@ -98,7 +108,7 @@ public class NetworkManagerListenerImpl /**
* Receives signals and dispatch them.
- * @param dBusSignal
+ * @param dBusSignal signal to handle.
*/
public void handle(DBusSignal dBusSignal)
{
|