summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2011-01-21 14:56:27 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2011-01-21 14:56:27 (GMT)
commit47ac9016fc778f10f4d5ab1abb056b0d0cc2963a (patch)
tree18cc7624ef1a68279ac2ae9b75ac0e89cec5eb6f /src/corelib/kernel
parenta2ba4ccd2c2d3daf2a4d719295c59395f03aba0b (diff)
downloadQt-47ac9016fc778f10f4d5ab1abb056b0d0cc2963a.zip
Qt-47ac9016fc778f10f4d5ab1abb056b0d0cc2963a.tar.gz
Qt-47ac9016fc778f10f4d5ab1abb056b0d0cc2963a.tar.bz2
Use the global message pool to avoid KErrServerBusy errors
Symbian IPC has two modes, either a preallocated message pool for the process (up to 255 allowed), or the global message pool. The default for the socket server is 8 preallocated slots, which is not enough to run the qnetworkreply autotest. However preallocating a large number of slots would be wasteful for an application that only uses one or two sockets at a time. Since we can't predict the usage, the global pool seems the best option. Reviewed-by: Iain
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qcore_symbian_p.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/kernel/qcore_symbian_p.cpp b/src/corelib/kernel/qcore_symbian_p.cpp
index fdae31b..45e07ad 100644
--- a/src/corelib/kernel/qcore_symbian_p.cpp
+++ b/src/corelib/kernel/qcore_symbian_p.cpp
@@ -223,7 +223,9 @@ QSymbianSocketManager::QSymbianSocketManager() :
// ### In future this could be changed to KAfInet6 when that is more common than IPv4
preferences.iAddrFamily = KAfInet;
preferences.iProtocol = KProtocolInetIp;
- qt_symbian_throwIfError(iSocketServ.Connect(preferences));
+ //use global message pool, as we do not know how many sockets app will use
+ //TODO: is this the right choice?
+ qt_symbian_throwIfError(iSocketServ.Connect(preferences, -1));
qt_symbian_throwIfError(iSocketServ.ShareAuto());
}