I have made the following changes intended for :
  CE:MW:Shared / mthemedaemon

Please review and accept or decline.
BOSS has already run some checks on this request.
See the "Messages from BOSS" section below.

https://build.pub.meego.com//request/show/7202

Thank You,
Islam Amer

[This message was auto-generated]

---

Request # 7202:

Messages from BOSS:

State: review at 2012-10-30T16:20:05 by bossbot

Reviews:
       accepted by bossbot : Prechecks succeeded.
       new for CE-maintainers : Please replace this text with a review and 
approve/reject the review (not the SR). BOSS will take care of the rest

Changes:
  submit: Project:MTF:MW / mthemedaemon -> CE:MW:Shared / mthemedaemon
  
changes files:
--------------
--- mthemedaemon.changes
+++ mthemedaemon.changes
@@ -0,0 +1,7 @@
+* Tue Oct 30 2012 Robin Burchell <[email protected]> - 1.0.1
+- Fix an infinite loop due to incorrect handling of partial reads
+- Fix cache writing handling
+
+* Tue Oct 30 2012 Robin Burchell <[email protected]> - 1.0.0
+- Ensure mthemedaemon service restarts
+

old:
----
  mthemedaemon-1.0.0.tar.bz2

new:
----
  mthemedaemon-1.0.1.tar.bz2

spec files:
-----------
--- mthemedaemon.spec
+++ mthemedaemon.spec
@@ -9,7 +9,7 @@
 # << macros
 
 Summary:    Shared theme resource loader
-Version:    1.0.0
+Version:    1.0.1
 Release:    1
 Group:      System/Libraries
 License:    LGPLv2.1

other changes:
--------------

++++++ mthemedaemon-1.0.0.tar.bz2 -> mthemedaemon-1.0.1.tar.bz2
--- msystemdirectories.cpp
+++ msystemdirectories.cpp
@@ -34,7 +34,7 @@
         cacheDir = cacheDirPrefix;
 
         // first check if we can write to the cache dir
-        cacheDir += "/var/cache/meegotouch";
+        cacheDir += "/var/cache/meegotouch/";
         QDir().mkpath(cacheDir);
         QFileInfo cacheDirInfo(cacheDir);
         if (!(cacheDirInfo.isWritable() && cacheDirInfo.isDir()))
--- mthemedaemonserver.cpp
+++ mthemedaemonserver.cpp
@@ -213,7 +213,9 @@
         stream.setVersion(QDataStream::Qt_4_6);
 
         // loop as long as the socket has some data left
-        while (socket->bytesAvailable()) {
+        // we must have at least a 32bit integer here, otherwise Packet's 
stream
+        // operator won't touch it, and we'll loop endlessly.
+        while (socket->bytesAvailable() >= sizeof(quint32)) {
             Packet packet;
             stream >> packet;
 
@@ -255,7 +257,9 @@
     }
 
     // client has registered, so we'll read all packets that are currently 
available from the socket
-    while (socket->bytesAvailable()) {
+    // we must have at least a 32bit integer here, otherwise Packet's stream
+    // operator won't touch it, and we'll loop endlessly.
+    while (socket->bytesAvailable() >= sizeof(quint32)) {
 
         // read packet from socket
         Packet packet;

++++++ mthemedaemon.service
--- mthemedaemon.service
+++ mthemedaemon.service
@@ -5,5 +5,6 @@
 
 [Service]
 ExecStart=/usr/bin/mthemedaemon
+Restart=always
 
 

++++++ mthemedaemon.yaml
--- mthemedaemon.yaml
+++ mthemedaemon.yaml
@@ -1,6 +1,6 @@
 Name: mthemedaemon
 Summary: Shared theme resource loader
-Version: 1.0.0
+Version: 1.0.1
 Release: 1
 Group: System/Libraries
 License: LGPLv2.1



Reply via email to