Show
Ignore:
Timestamp:
07/01/08 05:55:33 (5 months ago)
Author:
flynd
Message:

Added function to get user id of an owner. Added a DropOwner?() that takes the locked object as parameter like the other drop functions.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/licq/src/user.cpp

    r6364 r6370  
    835835} 
    836836 
     837string CUserManager::OwnerId(unsigned long ppid) 
     838{ 
     839  ICQOwner* owner = FetchOwner(ppid, LOCK_R); 
     840  if (owner == NULL) 
     841    return ""; 
     842 
     843  string ret = owner->IdString(); 
     844  DropOwner(ppid); 
     845  return ret; 
     846} 
     847 
    837848/*--------------------------------------------------------------------------- 
    838849 * CUserManager::AddUser 
     
    13681379  } 
    13691380  UnlockOwnerList(); 
     1381} 
     1382 
     1383void CUserManager::DropOwner(ICQOwner* owner) 
     1384{ 
     1385  if (owner == NULL) 
     1386    return; 
     1387  owner->Unlock(); 
    13701388} 
    13711389