From 82f91b888cd55b103fd5a53390944c5f3bb2e9db Mon Sep 17 00:00:00 2001 From: Alexey Shilov Date: Thu, 1 Dec 2011 17:22:49 +0200 Subject: [PATCH] Fixes: NB#288982 - COREWEB: booster '__assert_fail append_pending_request _XReply' RevBy: Juha Lintula --- debian/changelog | 3 ++- src/qdeclarativebooster/mdeclarativecache.cpp | 3 ++- src/single-instance/main.cpp | 9 ++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index dd8ff07..8b29581 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ -applauncherd (2.0.14) unstable; urgency=low +applauncherd (2.0.14) stable; urgency=low + * Fixes: NB#288982 - COREWEB: booster '__assert_fail append_pending_request _XReply' * Changes: updated some test cases in art-tests and test package dependencies * Changes: improve perf test to detect failure diff --git a/src/qdeclarativebooster/mdeclarativecache.cpp b/src/qdeclarativebooster/mdeclarativecache.cpp index 9d2d02c..e2ca12c 100644 --- a/src/qdeclarativebooster/mdeclarativecache.cpp +++ b/src/qdeclarativebooster/mdeclarativecache.cpp @@ -44,7 +44,8 @@ MDeclarativeCachePrivate::MDeclarativeCachePrivate() : initialArgv(new char* [initialArgc]), appDirPath(QString()), appFilePath(QString()), - cachePopulated(false) + cachePopulated(false), + testabilityInterface(0) { } diff --git a/src/single-instance/main.cpp b/src/single-instance/main.cpp index 5acf748..9267aad 100644 --- a/src/single-instance/main.cpp +++ b/src/single-instance/main.cpp @@ -217,8 +217,6 @@ Window windowIdForBinary(Display *dpy, const char *binaryName) unsigned long nItems = 0; unsigned long bytesAfter; unsigned char *prop = 0; - char **wmCommand = NULL; - int wmCommandCount = 0; // Get the client list of the root window int status = XGetWindowProperty(dpy, XDefaultRootWindow(dpy), netClientListAtom, @@ -230,17 +228,22 @@ Window windowIdForBinary(Display *dpy, const char *binaryName) Window * clients = reinterpret_cast(prop); for (unsigned long i = 0; i < nItems; i++) { + char **wmCommand = NULL; + int wmCommandCount = 0; + if (binaryNameForPid(windowPid(dpy, clients[i])) == binaryName || (XGetCommand (dpy, clients[i], &wmCommand, &wmCommandCount) != 0 && wmCommandCount > 0 && strcmp(wmCommand[0], binaryName) == 0)) { retValue = clients[i]; - break; } if (wmCommand) { XFreeStringList(wmCommand); } + + if (retValue) + break; } XFree(prop);