Changeset 6382

Show
Ignore:
Timestamp:
07/01/08 18:58:01 (3 months ago)
Author:
flynd
Message:

Marked old owner functions in user manager as deprecated. Updated daemon to use newer owner calls.

Location:
trunk/licq
Files:
14 modified

Legend:

Unmodified
Added
Removed
  • trunk/licq/include/licq_user.h

    r6370 r6382  
    12551255  ~CUserManager(); 
    12561256  bool Load(); 
    1257   void SetOwnerUin(unsigned long _nUin); 
    12581257 
    12591258  // For protocol plugins 
     
    12641263  ICQUser *FetchUser(const char *, unsigned long, unsigned short); 
    12651264  ICQOwner *FetchOwner(unsigned long, unsigned short); 
    1266   void DropOwner(unsigned long); 
    12671265 
    12681266  /** 
     
    12871285  ICQUser *FetchUser(unsigned long, unsigned short); 
    12881286  void DropUser(ICQUser *); 
    1289   ICQOwner *FetchOwner(unsigned short); 
    1290   void DropOwner(); 
    1291   unsigned long OwnerUin()  {return m_nOwnerUin; } 
    12921287  bool IsOnList(unsigned long nUin); 
     1288 
     1289  // Deprecated owner functions, to be removed 
     1290  void SetOwnerUin(unsigned long _nUin) __attribute__ ((deprecated)); 
     1291  unsigned long OwnerUin() __attribute__ ((deprecated)) { return icqOwnerUin(); } 
     1292  ICQOwner *FetchOwner(unsigned short) __attribute__ ((deprecated)); 
     1293  void DropOwner() __attribute__ ((deprecated)); 
     1294  void DropOwner(unsigned long) __attribute__ ((deprecated)); 
     1295 
     1296  /** 
     1297   * Convenience function to get icq owner as an unsigned long 
     1298   * Only meant to be used internally for icq protocol functions 
     1299   * 
     1300   * @return Icq owner 
     1301   */ 
     1302  unsigned long icqOwnerUin(); 
    12931303 
    12941304  /** 
     
    15021512  OwnerList m_vpcOwners; 
    15031513  ICQOwner *m_xOwner; 
    1504   unsigned long m_nOwnerUin; 
    15051514  unsigned short m_nUserListLockType; 
    15061515  unsigned short myGroupListLockType; 
  • trunk/licq/src/fifo.cpp

    r6306 r6382  
    154154StringToStatus(char *_szStatus) 
    155155{ 
    156   ICQOwner *o = gUserManager.FetchOwner(LOCK_R); 
     156  ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    157157  unsigned long nStatus = o->AddStatusFlags(0); 
    158158  int i =0; 
     
    172172    { NULL,       0                      } 
    173173  }; 
    174   gUserManager.DropOwner(); 
     174  gUserManager.DropOwner(o); 
    175175  if (_szStatus[0] == '*') 
    176176  { 
     
    335335static int fifo_status( int argc, const char *const *argv, void *data) 
    336336{ 
    337   ICQOwner *o; 
    338337  CICQDaemon *d= (CICQDaemon *) data; 
    339338  const char *szStatus = argv[1]; 
     
    348347 
    349348  // Determine the status to go to 
    350   o = gUserManager.FetchOwner(LOCK_R); 
     349  ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    351350  bOffline = o->StatusOffline(); 
    352   gUserManager.DropOwner(); 
     351  gUserManager.DropOwner(o); 
    353352  nStatus = StringToStatus(const_cast<char *>(szStatus)); 
    354353 
     
    374373  if( argc > 2 ) 
    375374  { 
    376     ICQOwner *o = gUserManager.FetchOwner(LOCK_W); 
     375    ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 
    377376    o->SetAutoResponse(argv[2]); 
    378     gUserManager.DropOwner(); 
     377    gUserManager.DropOwner(o); 
    379378  } 
    380379 
     
    386385static int fifo_auto_response( int argc, const char *const *argv, void* /* data */) 
    387386{ 
    388   ICQOwner *o;  
    389  
    390387  if( argc == 1 ) 
    391388  { 
     
    394391  } 
    395392 
    396   o = gUserManager.FetchOwner(LOCK_W); 
     393  ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 
    397394  o->SetAutoResponse(argv[1]); 
    398   gUserManager.DropOwner(); 
     395  gUserManager.DropOwner(o); 
    399396 
    400397  return 0; 
     
    504501  } 
    505502 
    506   ICQUser *owner = gUserManager.FetchOwner(LOCK_R); 
     503  ICQOwner* owner = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    507504  d->icqSendSms(argv[1], argv[2], owner->Uin()); 
    508   gUserManager.DropOwner(); 
     505  gUserManager.DropOwner(owner); 
    509506  return 0; 
    510507} 
  • trunk/licq/src/icqd-chat.cpp

    r6164 r6382  
    4949  m_szName = NULL; 
    5050  m_nPort = _nLocalPort; 
    51   m_nUin = gUserManager.OwnerUin(); 
    52   char szUin[24]; 
    53   sprintf(szUin, "%lu", m_nUin); 
    54   m_szId = strdup(szUin); 
     51  m_szId = strdup(gUserManager.OwnerId(LICQ_PPID).c_str()); 
     52  m_nUin = atol(m_szId); 
    5553  m_nPPID = LICQ_PPID; 
    5654  m_nColorForeRed = nColorForeRed; 
     
    6664  buffer->PackUnsignedLong(0x65); 
    6765  buffer->PackUnsignedLong(-ICQ_VERSION_TCP); 
    68   buffer->PackUnsignedLong(gUserManager.OwnerUin()); 
     66  buffer->PackUnsignedLong(m_nUin); 
    6967  buffer->PackString(_sLocalName); 
    7068  buffer->PackUnsignedShort(ReversePort(_nLocalPort)); 
     
    305303  m_szName = NULL; 
    306304  m_nPort = nLocalPort; 
    307   m_nUin = gUserManager.OwnerUin(); 
    308   char szUin[24]; 
    309   sprintf(szUin, "%lu", m_nUin); 
    310   m_szId = strdup(szUin); 
     305  m_szId = strdup(gUserManager.OwnerId(LICQ_PPID).c_str()); 
     306  m_nUin = atol(m_szId); 
    311307  m_nPPID = LICQ_PPID; 
    312308  m_nColorForeRed = nColorForeRed; 
     
    332328 
    333329  buffer->PackUnsignedLong(0x65); 
    334   buffer->PackUnsignedLong(gUserManager.OwnerUin()); 
     330  buffer->PackUnsignedLong(m_nUin); 
    335331  buffer->PackString(szLocalName); 
    336332  buffer->PackChar(nColorForeRed); 
     
    688684  licqDaemon = d; 
    689685 
    690   ICQOwner *o = gUserManager.FetchOwner(LOCK_R); 
     686  ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    691687  strncpy(m_szName, o->GetAlias(), 32); 
    692688  m_szName[31] = '\0'; 
    693689  m_nSession = o->Port(); 
    694   gUserManager.DropOwner(); 
     690  gUserManager.DropOwner(o); 
    695691 
    696692  m_nFontFace = FONT_PLAIN; 
     
    813809  if (!bSuccess) 
    814810  { 
    815     ICQOwner *o = gUserManager.FetchOwner(LOCK_R); 
     811    ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    816812    unsigned long nIp = bSendIntIp ? o->IntIp() : o->Ip(); 
    817     gUserManager.DropOwner(); 
    818    
     813    gUserManager.DropOwner(o); 
     814 
    819815    // try reverse connect 
    820816    int nId = licqDaemon->RequestReverseConnection(c->m_nUin, c->m_nSession, 
  • trunk/licq/src/icqd-srv.cpp

    r6357 r6382  
    500500void CICQDaemon::icqAlertUser(const char* id, unsigned long ppid) 
    501501{ 
    502   ICQOwner *o = gUserManager.FetchOwner(LOCK_R); 
     502  ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    503503  char sz[MAX_MESSAGE_SIZE]; 
    504504  sprintf(sz, "%s%c%s%c%s%c%s%c%c%c", o->GetAlias(), 0xFE, o->GetFirstName(), 
    505505          0xFE, o->GetLastName(), 0xFE, o->GetEmailPrimary(), 0xFE, 
    506506          o->GetAuthorization() ? '0' : '1', 0xFE); 
    507   gUserManager.DropOwner(); 
     507  gUserManager.DropOwner(o); 
    508508  CPU_ThroughServer *p = new CPU_ThroughServer(id, ICQ_CMDxSUB_ADDEDxTOxLIST, sz); 
    509509  gLog.Info(tr("%sAlerting user they were added (#%hu)...\n"), L_SRVxSTR, p->Sequence()); 
     
    659659  if (m_eStatus == STATUS_ONLINE) 
    660660  { 
    661     ICQOwner *o = gUserManager.FetchOwner(LOCK_R); 
     661    ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    662662    status = o->StatusFull(); 
    663     gUserManager.DropOwner(); 
     663    gUserManager.DropOwner(o); 
    664664  } 
    665665  else 
     
    783783  bool isLogon = o->StatusOffline(); 
    784784  int nPDINFO = o->GetPDINFO(); 
    785   gUserManager.DropOwner(LICQ_PPID); 
     785  gUserManager.DropOwner(o); 
    786786 
    787787  if (nPDINFO == 0) 
    788788  { 
    789789    icqCreatePDINFO(); 
    790    
     790 
    791791    o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    792792    nPDINFO = o->GetPDINFO(); 
    793     gUserManager.DropOwner(LICQ_PPID); 
    794   } 
    795    
     793    gUserManager.DropOwner(o); 
     794  } 
     795 
    796796  if (goInvisible) 
    797797  { 
     
    10771077  // Since ICQ5.1, the status change packet is sent first, which means it is 
    10781078  // assumed that the set security info packet works. 
    1079   ICQOwner *o = gUserManager.FetchOwner(LOCK_W); 
     1079  ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 
    10801080  o->SetEnableSave(false); 
    10811081  o->SetAuthorization(bAuthorize); 
     
    10851085  o->SaveLicqInfo(); 
    10861086  unsigned short s = o->StatusFull(); 
    1087   gUserManager.DropOwner(); 
     1087  gUserManager.DropOwner(o); 
    10881088  // Set status to ensure the status flags are set 
    10891089  icqSetStatus(s); 
     
    11801180  o->SetClientInfoTimestamp(time(NULL)); 
    11811181  bool bOffline = o->StatusOffline(); 
    1182   gUserManager.DropOwner(); 
     1182  gUserManager.DropOwner(o); 
    11831183 
    11841184  if (!bOffline) 
     
    11921192  o->SetClientInfoTimestamp(time(NULL)); 
    11931193  bool bOffline = o->StatusOffline(); 
    1194   gUserManager.DropOwner(); 
     1194  gUserManager.DropOwner(o); 
    11951195 
    11961196  if (!bOffline) 
     
    12051205  o->SetPhoneFollowMeStatus(nNewStatus); 
    12061206  bool bOffline = o->StatusOffline(); 
    1207   gUserManager.DropOwner(); 
     1207  gUserManager.DropOwner(o); 
    12081208 
    12091209  if (!bOffline) 
     
    18511851  if (o->IdString() == 0) 
    18521852  { 
    1853     gUserManager.DropOwner(); 
     1853    gUserManager.DropOwner(o); 
    18541854    gLog.Error("%sNo registered user, unable to process logon attempt.\n", L_ERRORxSTR); 
    18551855    return 0; 
     
    18571857  if (o->Password()[0] == '\0') 
    18581858  { 
    1859     gUserManager.DropOwner(); 
     1859    gUserManager.DropOwner(o); 
    18601860    gLog.Error(tr("%sNo password set.  Edit ~/.licq/owner.Licq and fill in the password field.\n"), L_ERRORxSTR); 
    18611861    return 0; 
     
    18631863 
    18641864  m_nDesiredStatus = o->AddStatusFlags(logonStatus); 
    1865   gUserManager.DropOwner(); 
     1865  gUserManager.DropOwner(o); 
    18661866 
    18671867  CPU_ConnectStart *startPacket = new CPU_ConnectStart(); 
     
    18831883    ICQOwner *o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    18841884    CPU_RequestLogonSalt *p =  new CPU_RequestLogonSalt(o->IdString()); 
    1885     gUserManager.DropOwner(); 
     1885    gUserManager.DropOwner(o); 
    18861886    gLog.Info(tr("%sRequesting logon salt (#%hu)...\n"), L_SRVxSTR, p->Sequence()); 
    18871887    SendEvent_Server(p); 
     
    20282028#endif 
    20292029 
    2030   ICQOwner *o = gUserManager.FetchOwner(LOCK_W); 
     2030  ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 
    20312031  if (o) 
    20322032    ChangeUserStatus(o, ICQ_STATUS_OFFLINE); 
    2033   gUserManager.DropOwner(); 
     2033  gUserManager.DropOwner(o); 
    20342034 
    20352035  if (m_szRegisterPasswd) 
     
    20832083int CICQDaemon::ConnectToServer(const char* server, unsigned short port) 
    20842084{ 
    2085   SrvSocket *s = new SrvSocket(gUserManager.OwnerUin()); 
     2085  SrvSocket *s = new SrvSocket(gUserManager.icqOwnerUin()); 
    20862086 
    20872087  if (m_bProxyEnabled) 
     
    21192119    // Now get the internal ip from this socket 
    21202120    CPacket::SetLocalIp(  NetworkIpToPacketIp(s->LocalIp() )); 
    2121     ICQOwner *o = gUserManager.FetchOwner(LOCK_W); 
     2121    ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 
    21222122    if (o) 
    21232123      o->SetIntIp(s->LocalIp()); 
    2124     gUserManager.DropOwner(); 
     2124    gUserManager.DropOwner(o); 
    21252125 
    21262126    gSocketManager.AddSocket(s); 
     
    23642364      // ICQOwner *o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    23652365      // unsigned long nListTime = o->GetSSTime(); 
    2366       // gUserManager.DropOwner(LICQ_PPID); 
     2366      // gUserManager.DropOwner(o); 
    23672367 
    23682368      CSrvPacketTcp* p; 
     
    24572457      realIP = PacketIpToNetworkIp(realIP); 
    24582458      CPacket::SetRealIp(NetworkIpToPacketIp(realIP)); 
    2459       ICQOwner *owner = gUserManager.FetchOwner(LOCK_W); 
     2459      ICQOwner* owner = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 
    24602460      owner->SetIp(realIP); 
    2461       gUserManager.DropOwner(); 
     2461      gUserManager.DropOwner(owner); 
    24622462 
    24632463      char buf[32]; 
     
    24682468      nOnlineSince = packet.UnpackUnsignedLongTLV(0x0003); 
    24692469 
    2470     ICQOwner *o = gUserManager.FetchOwner(LOCK_W); 
     2470    ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 
    24712471    unsigned long nPFM = o->PhoneFollowMeStatus(); 
    24722472    // Workaround for the ICQ4.0 problem of it not liking the PFM flags 
     
    24802480    gLog.Info(tr("%sServer says we're now: %s\n"), L_SRVxSTR, ICQUser::StatusToStatusStr(o->Status(), o->StatusInvisible())); 
    24812481 
    2482     gUserManager.DropOwner(); 
     2482    gUserManager.DropOwner(o); 
    24832483 
    24842484    break; 
     
    37763776          ICQOwner *o = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 
    37773777          AddUserEvent(o, e); 
    3778           gUserManager.DropOwner(); 
     3778          gUserManager.DropOwner(o); 
    37793779        } 
    37803780      } 
     
    38413841        if (AddUserEvent(o, eEvent)) 
    38423842        { 
    3843           gUserManager.DropOwner(LICQ_PPID); 
     3843          gUserManager.DropOwner(o); 
    38443844          eEvent->AddToHistory(NULL, LICQ_PPID, D_RECEIVER); 
    38453845          m_xOnEventManager.Do(ON_EVENT_SYSMSG, NULL); 
    38463846        } 
    38473847        else 
    3848           gUserManager.DropOwner(LICQ_PPID); 
     3848          gUserManager.DropOwner(o); 
    38493849        break; 
    38503850      } 
     
    38713871          if (AddUserEvent(o, eEvent)) 
    38723872          { 
    3873             gUserManager.DropOwner(); 
     3873            gUserManager.DropOwner(o); 
    38743874            eEvent->AddToHistory(NULL, LICQ_PPID, D_RECEIVER); 
    38753875            m_xOnEventManager.Do(ON_EVENT_SMS, NULL); 
    38763876          } 
    38773877          else 
    3878             gUserManager.DropOwner(); 
     3878            gUserManager.DropOwner(o); 
    38793879        } 
    38803880        break; 
     
    43494349            if (cPrivacySettings == ICQ_PRIVACY_ALLOW_FOLLOWING) 
    43504350              ChangeUserStatus(o, o->StatusFull() | ICQ_STATUS_FxPRIVATE); 
    4351             gUserManager.DropOwner(LICQ_PPID); 
     4351            gUserManager.DropOwner(o); 
    43524352            break; 
    43534353          } 
     
    43674367        CheckExport(); 
    43684368      } 
    4369        
     4369 
    43704370      // Update local info about contact list 
    43714371      nTime = packet.UnpackUnsignedLongBE(); 
    4372       ICQOwner *o = gUserManager.FetchOwner(LOCK_W); 
     4372      ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 
    43734373      o->SetSSTime(nTime); 
    43744374      o->SetSSCount(nCount); 
    4375       gUserManager.DropOwner(); 
     4375      gUserManager.DropOwner(o); 
    43764376 
    43774377      gLog.Info(tr("%sActivate server contact list.\n"), L_SRVxSTR); 
     
    44654465      unsigned long nListTime = o->GetSSTime(); 
    44664466      o->SetSSTime(time(0)); 
    4467       gUserManager.DropOwner(LICQ_PPID); 
     4467      gUserManager.DropOwner(o); 
    44684468 
    44694469      CSrvPacketTcp *pReply = 0; 
     
    46444644      if (AddUserEvent(o, e)) 
    46454645      { 
    4646         gUserManager.DropOwner(LICQ_PPID); 
     4646        gUserManager.DropOwner(o); 
    46474647        e->AddToHistory(NULL, LICQ_PPID, D_RECEIVER); 
    46484648        m_xOnEventManager.Do(ON_EVENT_SYSMSG, NULL); 
    46494649      } 
    46504650      else 
    4651         gUserManager.DropOwner(LICQ_PPID); 
    4652        
     4651        gUserManager.DropOwner(o); 
     4652 
    46534653      delete [] szId; 
    46544654      delete [] szMsg; 
     
    46954695      if (AddUserEvent(o, eEvent)) 
    46964696      { 
    4697         gUserManager.DropOwner(LICQ_PPID); 
     4697        gUserManager.DropOwner(o); 
    46984698        eEvent->AddToHistory(NULL, LICQ_PPID, D_RECEIVER); 
    46994699        m_xOnEventManager.Do(ON_EVENT_SYSMSG, NULL); 
    47004700      } 
    47014701      else 
    4702         gUserManager.DropOwner(LICQ_PPID); 
     4702        gUserManager.DropOwner(o); 
    47034703 
    47044704      delete [] szId; 
     
    47184718      if (AddUserEvent(o, e)) 
    47194719      { 
    4720         gUserManager.DropOwner(LICQ_PPID); 
     4720        gUserManager.DropOwner(o); 
    47214721        e->AddToHistory(NULL, LICQ_PPID, D_RECEIVER); 
    47224722        m_xOnEventManager.Do(ON_EVENT_SYSMSG, NULL); 
    47234723      } 
    47244724      else 
    4725         gUserManager.DropOwner(LICQ_PPID); 
     4725        gUserManager.DropOwner(o); 
    47264726 
    47274727      delete [] szId; 
     
    48314831      sendTM.tm_isdst = -1; 
    48324832 
    4833       ICQOwner *o = gUserManager.FetchOwner(LOCK_R); 
     4833          ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); 
    48344834      nTimeSent = mktime(&sendTM) - o->SystemTimeGMTOffset(); 
    4835       gUserManager.DropOwner(); 
    4836        
     4835          gUserManager.DropOwner(o); 
     4836 
    48374837      // Msg type & flags 
    48384838      unsigned short nTypeMsg = msg.UnpackUnsignedShort(); 
     
    50795079          CEventUnknownSysMsg *e = new CEventUnknownSysMsg(nTypeMsg, ICQ_CMDxRCV_SYSxMSGxOFFLINE, 
    50805080                                                           nUin, szMessage, nTimeSent, 0); 
    5081            
    5082       ICQOwner *o = gUserManager.FetchOwner(LOCK_W); 
     5081 
     5082              ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 
    50835083          AddUserEvent(o, e); 
    5084           gUserManager.DropOwner(); 
     5084              gUserManager.DropOwner(o); 
    50855085    } 
    50865086      } 
     
    51415141            } 
    51425142 
    5143         ICQOwner *o = gUserManager.FetchOwner(LOCK_W); 
     5143                ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 
    51445144            if (AddUserEvent(o, eEvent)) 
    51455145        { 
    5146               gUserManager.DropOwner(); 
     5146                  gUserManager.DropOwner(o); 
    51475147              eEvent->AddToHistory(NULL, LICQ_PPID, D_RECEIVER); 
    51485148              m_xOnEventManager.Do(ON_EVENT_SYSMSG, NULL); 
    51495149        } 
    51505150        else 
    5151           gUserManager.DropOwner(); 
     5151                  gUserManager.DropOwner(o); 
    51525152            break; 
    51535153      } 
     
    51665166        } 
    51675167        else 
    5168         {   
    5169           ICQOwner *o = gUserManager.FetchOwner(LOCK_W); 
     5168                { 
     5169                  ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 
    51705170          gLog.Info(tr("%sOffline SMS from %s.\n"), L_BLANKxSTR, eSms->Number()); 
    51715171          if (AddUserEvent(o, eEvent)) 
    51725172          { 
    5173             gUserManager.DropOwner(); 
     5173                    gUserManager.DropOwner(o); 
    51745174            eEvent->AddToHistory(NULL, LICQ_PPID, D_RECEIVER); 
    51755175            m_xOnEventManager.Do(ON_EVENT_SMS, NULL); 
    51765176          } 
    51775177          else 
    5178             gUserManager.DropOwner(); 
    5179         } 
     5178                    gUserManager.DropOwner(o); 
     5179                } 
    51805180        break; 
    51815181      } 
     
    52105210        if (pEvent != NULL && nResult == META_SUCCESS) 
    52115211        { 
    5212           ICQOwner *o = gUserManager.FetchOwner(LOCK_W); 
     5212              ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 
    52135213          o->SetEnableSave(false); 
    52145214          o->SetPassword(((CPU_SetPassword *)pEvent->m_pPacket)->m_szPassword); 
    52155215          o->SetEnableSave(true); 
    52165216          o->SaveLicqInfo(); 
    5217           gUserManager.DropOwner(); 
     5217              gUserManager.DropOwner(o); 
    52185218        } 
    52195219      } 
     
    52335233        { 
    52345234          CPU_Meta_SetGeneralInfo *p = (CPU_Meta_SetGeneralInfo *)pEvent->m_pPacket; 
    5235           ICQOwner *o = gUserManager.FetchOwner(LOCK_W); 
     5235              ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 
    52365236          o->SetEnableSave(false); 
    52375237          o->SetAlias(p->m_szAlias); 
     
    52665266          o->SetEnableSave(true); 
    52675267          o->SaveGeneralInfo(); 
    5268           gUserManager.DropOwner(); 
     5268              gUserManager.DropOwner(o); 
    52695269        } 
    52705270      } 
     
    52785278        { 
    52795279          CPU_Meta_SetEmailInfo *p = (CPU_Meta_SetEmailInfo *)pEvent->m_pPacket; 
    5280           ICQOwner *o = gUserManager.FetchOwner(LOCK_W); 
     5280              ICQOwner* o = gUserManager.FetchOwner(LICQ_PPID, LOCK_W); 
    52815281          o->SetEnableSave(false); 
    52825282          o->SetEmailSecondary(p->m_szEmailSecondary); 
     
    52905290          o->SetEnableSave(true); 
    52915291          o->SaveGeneralInfo(); 
    5292           gUserManager.DropOwner(); 
     5292              gUserManager.DropOwner(o); 
    52935293        } 
    52945294      }