summaryrefslogtreecommitdiffstats
path: root/src/serviceframework
diff options
context:
space:
mode:
authorAlex Wilson <alex.wilson@nokia.com>2012-05-30 18:04:25 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-31 03:46:20 +0200
commit4c99d54cb4a031a832bab280452d0498616882d3 (patch)
tree8da77b2f1e2c23ec314bb7d3ed11bc915c6e18c3 /src/serviceframework
parent120d92e181427aeef73201d6b8002590b78e88ef (diff)
Disable and re-enable read notifier in readIncoming
Probably won't make much difference to most platforms, but it's recommended in the QSocketNotifier documentation, so we should do it. Change-Id: If9fff5278c74876aeef677f486ad5f9099758aa9 Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
Diffstat (limited to 'src/serviceframework')
-rw-r--r--src/serviceframework/ipc/qremoteserviceregister_unix_p.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/serviceframework/ipc/qremoteserviceregister_unix_p.cpp b/src/serviceframework/ipc/qremoteserviceregister_unix_p.cpp
index a6dba6a1..e86512d2 100644
--- a/src/serviceframework/ipc/qremoteserviceregister_unix_p.cpp
+++ b/src/serviceframework/ipc/qremoteserviceregister_unix_p.cpp
@@ -551,6 +551,8 @@ void UnixEndPoint::readIncoming()
return;
}
+ readNotifier->setEnabled(false);
+
QByteArray raw_data;
raw_data.resize(4096);
int bytes = ::read(client_fd, raw_data.data(), 4096);
@@ -561,6 +563,7 @@ void UnixEndPoint::readIncoming()
qServiceLog() << "class" << "unixep"
<< "event" << "spurious eagain"
<< "name" << objectName();
+ readNotifier->setEnabled(true);
return;
}
@@ -627,6 +630,9 @@ void UnixEndPoint::readIncoming()
emit readyRead();
}
}
+
+ readNotifier->setEnabled(true);
+
Q_ASSERT(raw_data.isEmpty());
}