Author: toad
Date: 2007-09-08 12:06:24 +0000 (Sat, 08 Sep 2007)
New Revision: 15032

Modified:
   trunk/plugins/UPnP/UPnP.java
Log:
Consistently use lock object not this

Modified: trunk/plugins/UPnP/UPnP.java
===================================================================
--- trunk/plugins/UPnP/UPnP.java        2007-09-08 12:04:09 UTC (rev 15031)
+++ trunk/plugins/UPnP/UPnP.java        2007-09-08 12:06:24 UTC (rev 15032)
@@ -153,7 +153,7 @@

        private void registerPortMappings() {
                Set ports;
-               synchronized(this) {
+               synchronized(lock) {
                        ports = portsToForward;
                }
                if(ports == null) return;
@@ -204,7 +204,7 @@

        public void unregisterPortMappings() {
                Set ports;
-               synchronized(this) {
+               synchronized(lock) {
                        ports = portsForwarded;
                }
                this.unregisterPorts(ports);
@@ -422,7 +422,7 @@
                add.setArgumentValue("NewLeaseDuration", 0);

                if(add.postControlAction()) {
-                       synchronized(this) {
+                       synchronized(lock) {
                                portsForwarded.add(fp);
                        }
                        return true;
@@ -444,7 +444,7 @@
                remove.setArgumentValue("NewProtocol", protocol);

                boolean retval = remove.postControlAction();
-               synchronized(this) {
+               synchronized(lock) {
                        portsForwarded.remove(fp);
                }



Reply via email to