Changeset 6181
- Timestamp:
- 05/05/08 16:31:53 (5 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 24 modified
-
licq/include/licq_buffer.h (modified) (1 diff)
-
licq/include/licq_events.h (modified) (4 diffs)
-
licq/include/licq_icq.h (modified) (4 diffs)
-
licq/include/licq_icqd.h (modified) (10 diffs)
-
licq/include/licq_oscarservice.h (added)
-
licq/include/licq_packets.h (modified) (8 diffs)
-
licq/include/licq_proxy.h (modified) (2 diffs)
-
licq/include/licq_socket.h (modified) (1 diff)
-
licq/include/licq_user.h (modified) (3 diffs)
-
licq/src/buffer.cpp (modified) (1 diff)
-
licq/src/icqd-srv.cpp (modified) (13 diffs)
-
licq/src/icqd-tcp.cpp (modified) (4 diffs)
-
licq/src/icqd-threads.cpp (modified) (8 diffs)
-
licq/src/icqd.cpp (modified) (8 diffs)
-
licq/src/icqevent.cpp (modified) (3 diffs)
-
licq/src/icqpacket.cpp (modified) (15 diffs)
-
licq/src/Makefile.am (modified) (1 diff)
-
licq/src/oscarservice.cpp (added)
-
licq/src/socket.cpp (modified) (1 diff)
-
licq/src/support.c (modified) (1 diff)
-
licq/src/support.h (modified) (1 diff)
-
licq/src/user.cpp (modified) (4 diffs)
-
qt-gui/src/sigman.cpp (modified) (1 diff)
-
qt-gui/src/userinfodlg.cpp (modified) (1 diff)
-
qt4-gui/src/core/signalmanager.cpp (modified) (1 diff)
-
qt4-gui/src/dialogs/userinfodlg.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/licq/include/licq_buffer.h
r6168 r6181 127 127 CBuffer& operator >> (unsigned long &in); 128 128 char *UnpackRaw(char *, unsigned short); 129 char *UnpackBinBlock(char *, unsigned short); 129 130 char *UnpackString(char *, unsigned short); 130 131 char *UnpackString(); // Need to delete[] returned string -
trunk/licq/include/licq_events.h
r6180 r6181 248 248 249 249 // Daemon only 250 unsigned short SubType() const { return m_nSubType; } 251 unsigned short ExtraInfo() const { return m_nExtraInfo; } 250 unsigned short SubType() const { return m_nSubType; } 251 unsigned short ExtraInfo() const { return m_nExtraInfo; } 252 void SetSubType(unsigned short nSubType) { m_nSubType = nSubType; } 253 bool NoAck() const { return m_NoAck; } 254 void SetNoAck(bool NoAck) { m_NoAck = NoAck; } 255 bool IsCancelled() const { return m_bCancelled; } 256 257 void AttachPacket(CPacket *p); 252 258 253 259 // Compare this event to another one … … 291 297 292 298 friend class CICQDaemon; 299 friend class COscarService; 293 300 friend class CMSN; 294 301 friend void *ProcessRunningEvent_Client_tep(void *p); 295 302 friend void *ProcessRunningEvent_Server_tep(void *p); 303 friend void *OscarServiceSendQueue_tep(void *p); 296 304 friend void *MonitorSockets_tep(void *p); 297 305 }; … … 477 485 //! The user has requested to update the owner's profile/information. 478 486 PROTOxUPDATExINFO, 487 //! The user has requested the user's picture/icon/avatar/etc.. 488 PROTOxREQUESTxPICTURE, 479 489 //! The user has requested this user be added to the Invisible/Block list. 480 490 PROTOxBLOCKxUSER, … … 685 695 }; 686 696 697 class CRequestPicture : public CSignal 698 { 699 public: 700 CRequestPicture(const char *); 701 virtual ~CRequestPicture(); 702 }; 703 687 704 class CBlockUserSignal : public CSignal 688 705 { -
trunk/licq/include/licq_icq.h
r5972 r6181 35 35 const unsigned short ICQ_SNACxFAM_MESSAGE = 0x0004; 36 36 const unsigned short ICQ_SNACxFAM_BOS = 0x0009; 37 const unsigned short ICQ_SNACxFAM_BART = 0x0010; 37 38 const unsigned short ICQ_SNACxFAM_LIST = 0x0013; 38 39 const unsigned short ICQ_SNACxFAM_VARIOUS = 0x0015; … … 104 105 const unsigned short ICQ_SNACxREQUEST_IMAGE = 0x000C; // client 105 106 const unsigned short ICQ_SNACxSEND_IMAGE = 0x000D; // server 107 108 // Subtypes for BART family 109 const unsigned short ICQ_SNACxBART_ERROR = 0x0001; // server 110 const unsigned short ICQ_SNACxBART_UPLOAD = 0x0002; // client 111 const unsigned short ICQ_SNACxBART_UPLOADxACK = 0x0003; // server 112 const unsigned short ICQ_SNACxBART_DOWNLOADxREQUEST= 0x0006; // client 113 const unsigned short ICQ_SNACxBART_DOWNLOADxREPLY = 0x0007; // server 106 114 107 115 // Subtypes for list family … … 469 477 const unsigned short CHARSET_CUSTOM = 0x0003; 470 478 479 // BART Types 480 const unsigned short BART_TYPExBUDDY_ICON_SMALL = 0x0000; 481 const unsigned short BART_TYPExBUDDY_ICON = 0x0001; 482 const unsigned short BART_TYPExSTATUS_STR = 0x0002; 483 471 484 //actual plugins 472 485 const char PLUGIN_PHONExBOOK[] = { 0x90, 0x7C, 0x21, 0x2C, 0x91, 0x4D, … … 544 557 0x4E, 0xC5, 0x9D, 0x51, 0xA6, 0x47, 545 558 0x4E, 0x34, 0xF5, 0xA0 }; 559 560 const char ICQ_CAPABILITY_BART[] = { 0x09, 0x46, 0x13, 0x46, 0x4C, 0x7F, 561 0x11, 0xD1, 0x82, 0x22, 0x44, 0x45, 562 0x53, 0x54, 0x00, 0x00 }; 546 563 547 564 const char ICQ_CAPABILITY_LICQxVER[] = { 'L', 'i', 'c', 'q', ' ', 'c', -
trunk/licq/include/licq_icqd.h
r6180 r6181 43 43 class INetSocket; 44 44 class ProxyServer; 45 class COscarService; 45 46 class CReverseConnectToUserData; 46 47 class CMSN; … … 300 301 const char *szFaxNumber, const char *szAddress, const char *szCellularNumber, 301 302 const char *szZipCode, unsigned short nCountryCode, bool bHideEmail); 303 304 unsigned long ProtoRequestPicture(const char *szId, unsigned long nPPID); 302 305 303 306 unsigned long ProtoOpenSecureChannel(const char *szId, unsigned long nPPID); … … 476 479 void icqTypingNotification(const char *_szId, bool _bActive); 477 480 void icqCheckInvisible(const char *_szId); 481 void icqRequestService(unsigned short nFam); 478 482 479 483 // Visible/Invisible/Ignore list functions … … 516 520 char *ProtoPluginName(unsigned long); 517 521 522 EDaemonStatus Status() { return m_eStatus; } 523 518 524 void PluginUIViewEvent(const char *szId, unsigned long nPPID ) { 519 525 PushPluginSignal(new CICQSignal(SIGNAL_UI_VIEWEVENT, 0, szId, nPPID, 0)); … … 569 575 // Proxy options 570 576 void InitProxy(); 577 ProxyServer *CreateProxy(); 571 578 bool ProxyEnabled() { return m_bProxyEnabled; } 579 ProxyServer *GetProxy() { return m_xProxy; } 572 580 void SetProxyEnabled(bool b) { m_bProxyEnabled = b; } 573 581 unsigned short ProxyType() { return m_nProxyType; } … … 611 619 // ICQ options 612 620 bool UseServerContactList() { return m_bUseSS; } 621 bool UseServerSideBuddyIcons() { return m_bUseBART; } 613 622 bool SendTypingNotification() { return m_bSendTN; } 614 623 615 void SetUseServerContactList(bool b) { m_bUseSS = b; } 616 void SetSendTypingNotification(bool b) { m_bSendTN = b; } 624 void SetUseServerContactList(bool b) { m_bUseSS = b; } 625 void SetUseServerSideBuddyIcons(bool b); 626 void SetSendTypingNotification(bool b) { m_bSendTN = b; } 617 627 618 628 // Misc functions … … 702 712 ProxyServer *m_xProxy; 703 713 714 // Services 715 COscarService *m_xBARTService; 716 704 717 // Misc 705 718 bool m_bUseSS; // server side list 719 bool m_bUseBART; // server side buddy icons 706 720 bool m_bSendTN; // Send typing notifications 707 721 bool m_bReconnectAfterUinClash; // reconnect after uin has been used from another location? … … 731 745 thread_ping, 732 746 thread_updateusers, 747 thread_ssbiservice, 733 748 thread_shutdown; 734 749 … … 764 779 bool hasServerEvent(unsigned long); 765 780 void ProcessDoneEvent(ICQEvent *); 781 void PushEvent(ICQEvent *); 766 782 void PushExtendedEvent(ICQEvent *); 767 783 void PushPluginSignal(CICQSignal *); … … 832 848 friend void *ProcessRunningEvent_Client_tep(void *p); 833 849 friend void *ProcessRunningEvent_Server_tep(void *p); 850 friend void *OscarServiceSendQueue_tep(void *p); 834 851 friend void *Shutdown_tep(void *p); 835 852 friend void *ConnectToServer_tep(void *s); 836 853 friend class ICQUser; 837 854 friend class CSocketManager; 855 friend class COscarService; 838 856 friend class CChatManager; 839 857 friend class CFileTransferManager; -
trunk/licq/include/licq_packets.h
r6180 r6181 135 135 136 136 static bool s_bRegistered; 137 static unsigned short s_nSequence ;137 static unsigned short s_nSequence[32]; 138 138 static unsigned short s_nSubSequence; 139 139 static pthread_mutex_t s_xMutex; … … 146 146 unsigned short m_nSubCommand; 147 147 unsigned short m_nExtraInfo; 148 unsigned short m_nService; 148 149 149 150 char *m_szSequenceOffset; … … 220 221 { 221 222 public: 222 CPU_SendCookie(const char *, int len );223 CPU_SendCookie(const char *, int len, unsigned short nService = 0); 223 224 virtual ~CPU_SendCookie(); 224 225 }; … … 238 239 { 239 240 public: 240 CPU_GenericFamily(unsigned short Family, unsigned short SubType); 241 CPU_GenericFamily(unsigned short Family, unsigned short SubType, 242 unsigned short nService = 0); 241 243 virtual ~CPU_GenericFamily(); 242 244 }; … … 320 322 { 321 323 public: 322 CPU_ImICQ(); 324 CPU_ImICQ(); 325 CPU_ImICQ(unsigned short VerArray[][2], unsigned short NumVer, 326 unsigned short nService); 323 327 }; 324 328 … … 341 345 { 342 346 public: 343 CPU_RateAck( );347 CPU_RateAck(unsigned short nService = 0); 344 348 }; 345 349 … … 495 499 public: 496 500 CPU_ClientReady(); 501 CPU_ClientReady(unsigned short VerArray[][4], unsigned short NumVer, 502 unsigned short nService); 497 503 }; 498 504 … … 1134 1140 }; 1135 1141 1142 //-----RequestBuddyIcon------------------------------------------------------ 1143 class CPU_RequestBuddyIcon : public CPU_CommonFamily 1144 { 1145 public: 1146 CPU_RequestBuddyIcon(const char *szId, unsigned short _nBuddyIconType, 1147 char _nBuddyIconHashType, const char *_szBuddyIconHash, 1148 unsigned short nService); 1149 }; 1150 1151 class CPU_RequestService : public CPU_CommonFamily 1152 { 1153 public: 1154 CPU_RequestService(unsigned short nFam); 1155 }; 1156 1136 1157 //-----AIMFetchAwayMessage-------------------------------------------------- 1137 1158 class CPU_AIMFetchAwayMessage : public CPU_CommonFamily -
trunk/licq/include/licq_proxy.h
r4714 r6181 1 #ifndef PROXY_H 2 #define PROXY_H 3 1 4 #ifdef HAVE_CONFIG_H 2 5 #include "config.h" … … 69 72 bool HTTPOpenProxyConnection(const char *_szRemoteName, unsigned short _nRemotePort); 70 73 }; 74 75 #endif -
trunk/licq/include/licq_socket.h
r6164 r6181 167 167 bool SendPacket(CBuffer *b); 168 168 bool RecvPacket(); 169 bool ConnectTo(const char* server, unsigned short port, ProxyServer *xProxy); 169 170 }; 170 171 -
trunk/licq/include/licq_user.h
r6165 r6181 516 516 // Picture Info 517 517 bool GetPicturePresent() { return m_bPicturePresent; } 518 unsigned short BuddyIconType() { return m_nBuddyIconType; } 519 char BuddyIconHashType() { return m_nBuddyIconHashType; } 520 char *BuddyIconHash() { return m_szBuddyIconHash; } 521 char *OurBuddyIconHash() { return m_szOurBuddyIconHash; } 518 522 519 523 // Dynamic info fields for protocol plugins … … 635 639 // Picture info 636 640 void SetPicturePresent(bool b) { m_bPicturePresent = b; SavePictureInfo(); } 641 void SetBuddyIconType(unsigned short s) { m_nBuddyIconType = s; } 642 void SetBuddyIconHashType(char s) { m_nBuddyIconHashType = s; } 643 void SetBuddyIconHash(char *s) { SetString(&m_szBuddyIconHash, s); } 644 void SetOurBuddyIconHash(char *s) { SetString(&m_szOurBuddyIconHash, s); } 637 645 638 646 // Licq Info … … 946 954 // Picture Info 947 955 bool m_bPicturePresent; 956 unsigned short m_nBuddyIconType; 957 char m_nBuddyIconHashType; 958 char *m_szBuddyIconHash, *m_szOurBuddyIconHash; 948 959 949 960 // Dynamic info fields for protocol plugins -
trunk/licq/src/buffer.cpp
r6165 r6181 324 324 for (unsigned short i = 0; i < _nSize; i++) *this >> sz[i]; 325 325 sz[_nSize] = '\0'; 326 return sz; 327 } 328 329 char *CBuffer::UnpackBinBlock(char *sz, unsigned short _nSize) 330 { 331 for (unsigned short i = 0; i < _nSize; i++) *this >> sz[i]; 326 332 return sz; 327 333 } -
trunk/licq/src/icqd-srv.cpp
r6180 r6181 21 21 #include <algorithm> 22 22 23 #include <boost/scoped_array.hpp> 24 23 25 // Localization 24 26 #include "gettext.h" … … 28 30 #include "licq_icqd.h" 29 31 #include "licq_translate.h" 32 #include "licq_oscarservice.h" 30 33 #include "licq_packets.h" 31 34 #include "licq_socket.h" … … 717 720 } 718 721 722 //-----ProtoRequestPicture------------------------------------------------------ 723 unsigned long CICQDaemon::ProtoRequestPicture(const char *_szId, unsigned long _nPPID) 724 { 725 unsigned long nRet = 0; 726 727 if (_nPPID == LICQ_PPID) 728 { 729 ICQUser *u = gUserManager.FetchUser(_szId, LICQ_PPID, LOCK_R); 730 if (u == NULL) return 0; 731 732 if (UseServerSideBuddyIcons() && strlen(u->BuddyIconHash()) > 0) 733 { 734 gUserManager.DropUser(u); 735 nRet = m_xBARTService->SendEvent(_szId, ICQ_SNACxBART_DOWNLOADxREQUEST, true); 736 } 737 else 738 { 739 bool bSendServer = (u->SocketDesc(ICQ_CHNxINFO) < 0); 740 gUserManager.DropUser(u); 741 nRet = icqRequestPicture(_szId, bSendServer); 742 } 743 } 744 else 745 PushProtoSignal(new CRequestPicture(_szId), _nPPID); 746 747 return nRet; 748 } 749 750 //-----icqRequestService-------------------------------------------------------- 751 void CICQDaemon::icqRequestService(unsigned short nFam) 752 { 753 CPU_CommonFamily *p = new CPU_RequestService(nFam); 754 gLog.Info(tr("%sRequesting service socket for FAM 0x%02X (#%hu/#%d)...\n"), 755 L_SRVxSTR, nFam, p->Sequence(), p->SubSequence()); 756 SendEvent_Server(p); 757 } 758 719 759 //-----icqSetStatus------------------------------------------------------------- 720 760 unsigned long CICQDaemon::ProtoSetStatus(unsigned long _nPPID, … … 1737 1777 case MAKESNAC(ICQ_SNACxFAM_LOCATION, ICQ_SNACxREQUESTxUSERxINFO): 1738 1778 case MAKESNAC(ICQ_SNACxFAM_LOCATION, ICQ_SNACxLOC_INFOxREQ): 1779 case MAKESNAC(ICQ_SNACxFAM_BART, ICQ_SNACxBART_DOWNLOADxREQUEST): 1739 1780 PushPluginEvent(e); 1740 1781 break; … … 1877 1918 void CICQDaemon::postLogoff(int nSD, ICQEvent *cancelledEvent) 1878 1919 { 1920 if (m_xBARTService) 1921 { 1922 if (m_xBARTService->GetSocketDesc() != -1) 1923 { 1924 gSocketManager.CloseSocket(m_xBARTService->GetSocketDesc()); 1925 m_xBARTService->ResetSocket(); 1926 m_xBARTService->ChangeStatus(STATUS_UNINITIALIZED); 1927 m_xBARTService->ClearQueue(); 1928 } 1929 } 1879 1930 pthread_mutex_lock(&mutex_runningevents); 1880 1931 pthread_mutex_lock(&mutex_sendqueue_server); … … 2026 2077 return (-1); 2027 2078 } 2028 s->SetProxy(m_xProxy);2029 2079 } 2030 2080 else if (m_xProxy != NULL) … … 2034 2084 } 2035 2085 2036 char ipbuf[32]; 2037 2038 if (m_xProxy == NULL) 2039 { 2040 gLog.Info(tr("%sResolving %s port %d...\n"), L_SRVxSTR, server, port); 2041 if (!s->SetRemoteAddr(server, port)) { 2042 char buf[128]; 2043 gLog.Warn(tr("%sUnable to resolve %s:\n%s%s.\n"), L_ERRORxSTR, 2044 server, L_BLANKxSTR, s->ErrorStr(buf, 128)); 2045 delete s; 2046 return (-1); // no route to host (not connected) 2047 } 2048 gLog.Info(tr("%sICQ server found at %s:%d.\n"), L_SRVxSTR, 2049 s->RemoteIpStr(ipbuf), s->RemotePort()); 2050 } 2051 else 2052 { 2053 // It doesn't matter if it resolves or not, the proxy should do it then 2054 s->SetRemoteAddr(server, port); 2055 } 2056 2057 if (m_xProxy == NULL) 2058 gLog.Info(tr("%sOpening socket to server.\n"), L_SRVxSTR); 2059 else 2060 gLog.Info("%sOpening socket to server via proxy.\n", L_SRVxSTR); 2061 if (!s->OpenConnection()) 2062 { 2063 char buf[128]; 2064 gLog.Warn(tr("%sUnable to connect to %s:%d:\n%s%s.\n"), L_ERRORxSTR, 2065 s->RemoteIpStr(ipbuf), s->RemotePort(), L_BLANKxSTR, 2066 s->ErrorStr(buf, 128)); 2086 if (!s->ConnectTo(server, port, m_xProxy)) 2087 { 2067 2088 delete s; 2068 2089 return -1; … … 2222 2243 // each case to do the same thing. However, the individual case's may depend on the tlv 2223 2244 // coming to them, so leave this commented out for now and do some testing 2224 /*2225 2245 if (snacFlags & 0x8000) 2226 2246 { 2227 2247 unsigned short bytes = packet.UnpackUnsignedShortBE(); 2228 unsigned short tlvCount = packet.UnpackUnsignedShortBE(); 2229 if (!packet.readTLV(tlvCount, bytes)) 2248 if (!packet.readTLV(-1, bytes)) 2230 2249 { 2231 2250 gLog.Error(tr("%sError parsing SNAC header\n"), L_SRVxSTR); … … 2233 2252 } 2234 2253 } 2235 */2236 2254 2237 2255 switch (nSubtype) 2238 2256 { 2239 case ICQ_SNACxSUB_READYxSERVER:2257 case ICQ_SNACxSUB_READYxSERVER: 2240 2258 { 2241 2259 CSrvPacketTcp* p; … … 2258 2276 } 2259 2277 2260 case ICQ_SNACxSRV_ACKxIMxICQ: 2278 case ICQ_SNACxSUB_REDIRECT: 2279 { 2280 unsigned short nFam = 0; 2281 2282 if (!packet.readTLV()) 2283 { 2284 gLog.Warn(tr("%sError during parsing service redirect packet!\n"), L_WARNxSTR); 2285 break; 2286 } 2287 if (packet.getTLVLen(0x000D) == 2) 2288 nFam = packet.UnpackUnsignedShortTLV(0x000D); 2289 2290 gLog.Info(tr("%sRedirect for service 0x%02X received.\n"), L_SRVxSTR, nFam); 2291 2292 char *szServer = packet.UnpackStringTLV(0x0005); 2293 char *szCookie = packet.UnpackStringTLV(0x0006); 2294 unsigned short nCookieLen = packet.getTLVLen(0x0006); 2295 if (!szServer || !szCookie) 2296 { 2297 gLog.Warn(tr("%sInvalid servername (%s) or cookie (%s) in service redirect packet!\n"), 2298 L_WARNxSTR, szServer ? szServer : "(null)", szCookie ? szCookie : "(null)"); 2299 if (szServer) delete [] szServer; 2300 if (szCookie) delete [] szCookie; 2301 break; 2302 } 2303 2304 char *szPort = strchr(szServer, ':'); 2305 unsigned short nPort; 2306 if (szPort) 2307 { 2308 *szPort++ = '\0'; 2309 nPort = atoi(szPort); 2310 } 2311 else 2312 { 2313 nPort = m_nICQServerPort; 2314 } 2315 2316 switch (nFam) 2317 { 2318 case ICQ_SNACxFAM_BART: 2319 if (m_xBARTService) 2320 { 2321 m_xBARTService->SetConnectCredential(szServer, nPort, szCookie, nCookieLen); 2322 m_xBARTService->ChangeStatus(STATUS_SERVICE_REQ_ACKED); 2323 break; 2324 } 2325 else 2326 { 2327 gLog.Warn(tr("%sService redirect packet for unallocated BART service.\n"), 2328 L_WARNxSTR); 2329 break; 2330 } 2331 2332 default: 2333 gLog.Warn(tr("%sService redirect packet for unhandled service 0x%02X.\n"), 2334 L_WARNxSTR, nFam); 2335 } 2336 2337 delete [] szServer; 2338 delete [] szCookie; 2339 break; 2340 } 2341 2342 case ICQ_SNACxSRV_ACKxIMxICQ: 2261 2343 { 2262 2344 // ICQOwner *o = gUserManager.FetchOwner(LICQ_PPID, LOCK_R); … … 2297 2379 break; 2298 2380 } 2299 case ICQ_SNACxSUB_RATE_INFO: 2300 { 2381 2382 case ICQ_SNACxSUB_RATE_INFO: 2383 { 2301 2384 gLog.Info(tr("%sServer sent us rate information.\n"), L_SRVxSTR); 2302 2385 CSrvPacketTcp *p = new CPU_RateAck(); … … 2320 2403 case ICQ_SNACxRCV_NAMExINFO: 2321 2404 { 2322 if (snacFlags & 0x8000)2323 {2324 unsigned short bytes = packet.UnpackUnsignedShortBE();2325 if (!packet.readTLV(-1, bytes))2326 {2327 gLog.Error(tr("%sError parsing SNAC header\n"), L_SRVxSTR);2328 return;2329 }2330 }2331 2332 2405 unsigned short evil, tlvBlocks; 2333 2406 unsigned long nUin, realIP; … … 2869 2942 } 2870 2943 2944 if (packet.hasTLV(0x001d)) // Server-stored buddy icon information 2945 { 2946 CBuffer BART_info = packet.UnpackTLV(0x001d); 2947 unsigned short IconType = BART_info.UnpackUnsignedShortBE(); 2948 char HashType = BART_info.UnpackChar(); 2949 char HashLength = BART_info.UnpackChar(); 2950 2951 switch (IconType) 2952 { 2953 case BART_TYPExBUDDY_ICON_SMALL: 2954 case BART_TYPExBUDDY_ICON: 2955 { 2956 if (HashType == 1 && HashLength > 0 && HashLength <= 16) 2957 { 2958 boost::scoped_array<char> Hash(new char[HashLength]); 2959 boost::scoped_array<char> HashHex(new char[HashLength*2 + 1]); 2960 2961 BART_info.UnpackBinBlock(Hash.get(), HashLength); 2962 u->SetBuddyIconHash(PrintHex(HashHex.get(), Hash.get(), HashLength)); 2963 u->SetBuddyIconType(IconType); 2964 u->SetBuddyIconHashType(HashType); 2965 u->SavePictureInfo(); 2966 } 2967 break; 2968 } 2969 2970 default: // Unsupported types of BART 2971 gLog.Warn(tr("%sUnsupported type 0x%02X of buddy icon for %s.\n"), 2972 L_WARNxSTR, IconType, u->GetAlias()); 2973 break; 2974 <
