Changeset 6471

Show
Ignore:
Timestamp:
07/27/08 18:50:04 (4 months ago)
Author:
flynd
Message:

If we get an owner event, don't lock the owner at the same time as the user, which in this case also is the owner. This fixes #1631.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/qt-gui/src/mainwin.cpp

    r6432 r6471  
    13981398      if (m_bAutoPopup && sig->Argument() > 0) 
    13991399      { 
     1400        const ICQOwner* o = gUserManager.FetchOwner(nPPID, LOCK_R); 
     1401        unsigned short s = ICQ_STATUS_OFFLINE; // if we have no owner we're very likely offline 
     1402        if (o != NULL) 
     1403        { 
     1404          s = o->Status(); 
     1405          gUserManager.DropOwner(o); 
     1406        } 
     1407 
    14001408        ICQUser *u = gUserManager.FetchUser(szId, nPPID, LOCK_R); 
    14011409        if (u != NULL && u->NewMessages() > 0) 
    14021410        { 
    1403           ICQOwner *o = gUserManager.FetchOwner(nPPID, LOCK_R); 
    1404           unsigned short s; 
    1405           if (o == 0) 
    1406           { 
    1407             s = ICQ_STATUS_OFFLINE; // if we have no owner we're very likely offline ;) 
    1408           } 
    1409           else 
    1410           { 
    1411             s = o->Status(); 
    1412             gUserManager.DropOwner(o); 
    1413           } 
    14141411          if (s == ICQ_STATUS_ONLINE || s == ICQ_STATUS_FREEFORCHAT) 
    14151412          {