[Swift-commit] cog r3742

swift at ci.uchicago.edu swift at ci.uchicago.edu
Wed Jul 10 19:20:03 CDT 2013


------------------------------------------------------------------------
r3742 | hategan | 2013-07-10 19:19:18 -0500 (Wed, 10 Jul 2013) | 1 line

fixed job notifications not propagating to client
------------------------------------------------------------------------
Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/NotificationManager.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/NotificationManager.java	(revision 3741)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/NotificationManager.java	(working copy)
@@ -61,7 +61,14 @@
     public void registerListener(String id, Task task, ExtendedStatusListener l) {
         List<ExtendedStatus> p;
         synchronized (listeners) {
-            listeners.put(id, new TaskListenerPair(task, l));
+            TaskListenerPair tlp = listeners.get(id);
+            if (tlp == null) {
+                tlp = new TaskListenerPair(task, l);
+                listeners.put(id, tlp);
+            }
+            else {
+                tlp.addListener(l);
+            }
             p = pending.remove(id);
         }
         if (p != null) {
@@ -88,8 +95,9 @@
             }
         }
         if (ls != null) {
-            for (ExtendedStatusListener l : ls.listeners)
-            l.statusChanged(s, out, err);
+            for (ExtendedStatusListener l : ls.listeners) {
+                l.statusChanged(s, out, err);
+            }
         }
     }
 



More information about the Swift-commit mailing list