Changeset 6244 for trunk/console

Show
Ignore:
Timestamp:
06/08/08 17:55:51 (6 months ago)
Author:
flynd
Message:

Fixed a mutex problem when trying to go online. And don't use data for user after we've released lock.

Location:
trunk/console/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/console/src/console.cpp

    r6232 r6244  
    534534      if (u != NULL) 
    535535      { 
    536         if (u->GetInGroup(m_nGroupType, m_nCurrentGroup)) 
     536        bool isInGroup = u->GetInGroup(m_nGroupType, m_nCurrentGroup); 
     537        gUserManager.DropUser(u); 
     538 
     539        if (isInGroup) 
    537540        { 
    538541          CreateUserList(); 
    539542          PrintUsers(); 
    540543        } 
    541         gUserManager.DropUser(u); 
    542544      } 
    543545 
  • trunk/console/src/console_print.cpp

    r6176 r6244  
    776776  // Get the user's name 
    777777  ICQUser *u = gUserManager.FetchUser(ftman->Uin(), LOCK_R); 
    778   const char *szAlias = u->GetAlias(); 
    779   gUserManager.DropUser(u); 
    780778 
    781779  // Make the title 
     
    783781  ftman->Direction() == D_RECEIVER ? strcpy(szTitle, "File from ") : 
    784782    strcpy(szTitle, "File to "); 
    785   strcat(szTitle, szAlias); 
     783  strcat(szTitle, u->GetAlias()); 
     784 
     785  gUserManager.DropUser(u); 
    786786 
    787787  // Current file name and Current File # slash Total Batch Files