[haiku-commits] haiku: hrev48661 - src/apps/haikudepot/ui

  • From: superstippi@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 11 Jan 2015 16:26:20 +0100 (CET)

hrev48661 adds 1 changeset to branch 'master'
old head: a15d13d9bb03293cbde0bf3c316130ce29e18cb0
new head: fed7859a71f6b2c5fda4946d5de02008f16c00dc
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=fed7859+%5Ea15d13d

----------------------------------------------------------------------------

fed7859: HaikuDepot: Quitting while contents were populated dead-locked.
  
  Fixes #11737

                                      [ Stephan Aßmus <superstippi@xxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev48661
Commit:      fed7859a71f6b2c5fda4946d5de02008f16c00dc
URL:         http://cgit.haiku-os.org/haiku/commit/?id=fed7859
Author:      Stephan Aßmus <superstippi@xxxxxx>
Date:        Sun Jan 11 15:24:13 2015 UTC

Ticket:      https://dev.haiku-os.org/ticket/11737

----------------------------------------------------------------------------

1 file changed, 5 insertions(+), 4 deletions(-)
src/apps/haikudepot/ui/PackageContentsView.cpp | 9 +++++----

----------------------------------------------------------------------------

diff --git a/src/apps/haikudepot/ui/PackageContentsView.cpp 
b/src/apps/haikudepot/ui/PackageContentsView.cpp
index 4e900ab..bf1ef4e 100644
--- a/src/apps/haikudepot/ui/PackageContentsView.cpp
+++ b/src/apps/haikudepot/ui/PackageContentsView.cpp
@@ -125,7 +125,7 @@ public:
 //                     entry->Parent() != NULL ? entry->Parent()->Name() : 
"NULL",
 //                     entry->Name());
 
-               if (!fListView->LockLooper())
+               if (fListView->LockLooperWithTimeout(1000000) != B_OK)
                        return B_ERROR;
 
                // Check if we are still supposed to popuplate the list
@@ -342,7 +342,7 @@ PackageContentsView::_ContentPopulatorThread(void* arg)
 
                if (package.Get() != NULL) {
                        if (!view->_PopuplatePackageContens(*package.Get())) {
-                               if (view->LockLooper()) {
+                               if (view->LockLooperWithTimeout(1000000) == 
B_OK) {
                                        view->fContentListView->AddItem(
                                                new 
BStringItem(B_TRANSLATE("<Package contents not "
                                                        "available for remote 
packages>")));
@@ -403,10 +403,11 @@ PackageContentsView::_PopuplatePackageContens(const 
PackageInfo& package)
                fPackageLock, fPackage);
        status = reader.ParseContent(&contentHandler);
        if (status != B_OK) {
-               printf("PackageContentsView::SetPackage(): "
+               printf("PackageContentsView::_PopuplatePackageContens(): "
                        "failed parse package contents: %s\n", 
strerror(status));
                // NOTE: Do not return false, since it taken to mean this
-               // is a remote package.
+               // is a remote package, but is it not, we simply want to stop
+               // populating the contents early.
        }
        return true;
 }


Other related posts:

  • » [haiku-commits] haiku: hrev48661 - src/apps/haikudepot/ui - superstippi