[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    icecream/daemon
From:       Dirk Mueller <mueller () kde ! org>
Date:       2006-07-05 22:36:53
Message-ID: 1152139013.569703.10958.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 558747 by mueller:

its not a good idea to loop here. we might end up
in the TOCOMPILE state and then not select() on the
filedescriptor anymore, so the daemon gets stuck. 

trust me, this is the last bug.


 M  +2 -6      main.cpp  


--- trunk/icecream/daemon/main.cpp #558746:558747
@@ -1021,7 +1021,7 @@
            messages queue up, we can't handle them right now
            anyway, and we don't want to end the client because
            of a protocol error. */
-        return false;
+        return true;
     }
 
     Msg *msg = c->get_msg();
@@ -1077,14 +1077,10 @@
          it != fd2chan.end();) {
         int i = it->first;
         MsgChannel *c = it->second;
-        bool ok = true;
         ++it;
         /* handle_activity() can delete c and make the iterator
            invalid.  */
-        while (ok && c->has_msg ())
-            if (!handle_activity (c))
-                ok = false;
-        if (ok)  {
+        if (!c->has_msg() || handle_activity(c)) {
             if (i > max_fd)
                 max_fd = i;
             FD_SET (i, &listen_set);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic