Changeset 6206

Show
Ignore:
Timestamp:
05/25/08 14:32:21 (8 months ago)
Author:
emostar
Message:

Save the user's alias to the TLV when SetAlias? is called.
If the TLV is not present, make it.

Files:
1 modified

Legend:

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

    r6199 r6206  
    26222622    SetString(&m_szAlias, s); 
    26232623 
     2624  // If there is a valid alias, set the server side list alias as well. 
     2625  // If one is not present, add the TLV 
     2626  if (m_szAlias) 
     2627  { 
     2628    size_t aliasLen = strlen(m_szAlias); 
     2629    TLVListIter aliasIter = myTLVs.find(0x131); 
     2630    if (aliasIter == myTLVs.end()) 
     2631    { 
     2632      TLVPtr aliasTLV(new COscarTLV(0x131, aliasLen, reinterpret_cast<unsigned char*>(m_szAlias))); 
     2633      AddTLV(aliasTLV); 
     2634    } 
     2635    else 
     2636    { 
     2637      aliasIter->second->setData(reinterpret_cast<unsigned char*>(m_szAlias), aliasLen); 
     2638    } 
     2639  } 
     2640 
    26242641  SaveGeneralInfo(); 
    26252642}