[Kst] branches/work/kst/portto4/kst/src/libkst

Barth Netterfield netterfield at astro.utoronto.ca
Wed Mar 24 03:05:24 CET 2010


SVN commit 1106882 by netterfield:

Found a serious bug in the update manager - previously, it only worked by
chance.... I'm really hoping that this will fix the windows update bug.
Can someone check?

CCBUG: 225347 

(also, fix a typo in data vector locking...)



 M  +1 -1      datavector.cpp  
 M  +2 -2      updatemanager.cpp  


--- branches/work/kst/portto4/kst/src/libkst/datavector.cpp #1106881:1106882
@@ -747,7 +747,7 @@
 {
   _file->readLock();
   const Optional op = _file->vector().optional(field);
-  _file->readLock();
+  _file->unlock();
   return op;
 }
 
--- branches/work/kst/portto4/kst/src/libkst/updatemanager.cpp #1106881:1106882
@@ -117,11 +117,11 @@
       if (retval == Object::Updated) n_updated++;
       else if (retval == Object::Deferred) n_deferred++;
       else if (retval == Object::NoChange) n_unchanged++;
-      maxloop = qMin(maxloop,n_deferred);
     }
+    maxloop = qMin(maxloop,n_deferred);
     //qDebug() << "loop: " << i_loop << " obj up: " << n_updated << "  obj def: " << n_deferred << " obj_no: " << n_unchanged;
     i_loop++;
-  } while ((retval>0) && (i_loop<=maxloop));
+  } while ((n_deferred + n_updated > 0) && (i_loop<=maxloop));
 
   emit objectsUpdated(_serial);
 }


More information about the Kst mailing list