diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-28 17:38:49 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-28 17:38:49 +0000 |
commit | 5e9e63c45e37917ffb0acd83832d0d8f99d01883 (patch) | |
tree | 1b674b85b1f582a13bd2a57ec73377b8989141bc /protocols/IcqOscarJ/src/fam_02location.cpp | |
parent | 7105dcf75bdd939ca52ba045bc29c536c3f7ba49 (diff) |
new macroses for MS_PROTO_CHAINRECV: ProtoChainRecv, ProtoChainRecvMsg & ProtoChainRecvFile
git-svn-id: http://svn.miranda-ng.org/main/trunk@2540 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/src/fam_02location.cpp')
-rw-r--r-- | protocols/IcqOscarJ/src/fam_02location.cpp | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/protocols/IcqOscarJ/src/fam_02location.cpp b/protocols/IcqOscarJ/src/fam_02location.cpp index 2398cf18c6..a4b8601e78 100644 --- a/protocols/IcqOscarJ/src/fam_02location.cpp +++ b/protocols/IcqOscarJ/src/fam_02location.cpp @@ -249,8 +249,6 @@ void CIcqProto::handleLocationUserInfoReply(BYTE* buf, WORD wLen, DWORD dwCookie oscar_tlv* pTLV;
BYTE *tmp;
char *szMsg = NULL;
- CCSDATA ccs;
- PROTORECVEVENT pre;
// Syntax check
if (wLen < 4)
@@ -266,22 +264,19 @@ void CIcqProto::handleLocationUserInfoReply(BYTE* buf, WORD wLen, DWORD dwCookie wLen -= (buf - tmp);
// Get extra chain
- if (pChain = readIntoTLVChain(&buf, wLen, 2))
- {
+ if (pChain = readIntoTLVChain(&buf, wLen, 2)) {
char* szEncoding = NULL;
// Get Away encoding TLV
pTLV = pChain->getTLV(0x03, 1);
- if (pTLV && (pTLV->wLen >= 1))
- {
+ if (pTLV && (pTLV->wLen >= 1)) {
szEncoding = (char*)_alloca(pTLV->wLen + 1);
memcpy(szEncoding, pTLV->pData, pTLV->wLen);
szEncoding[pTLV->wLen] = '\0';
}
// Get Away info TLV
pTLV = pChain->getTLV(0x04, 1);
- if (pTLV && (pTLV->wLen >= 1))
- {
+ if (pTLV && (pTLV->wLen >= 1)) {
szMsg = (char*)SAFE_MALLOC(pTLV->wLen + 2);
memcpy(szMsg, pTLV->pData, pTLV->wLen);
szMsg[pTLV->wLen] = '\0';
@@ -293,16 +288,12 @@ void CIcqProto::handleLocationUserInfoReply(BYTE* buf, WORD wLen, DWORD dwCookie disposeChain(&pChain);
}
- ccs.szProtoService = PSR_AWAYMSG;
- ccs.hContact = hContact;
- ccs.wParam = status;
- ccs.lParam = (LPARAM)⪯
+ PROTORECVEVENT pre;
pre.flags = 0;
- pre.szMessage = szMsg?szMsg:(char *)"";
+ pre.szMessage = szMsg ? szMsg : (char *)"";
pre.timestamp = time(NULL);
pre.lParam = dwCookie;
-
- CallService(MS_PROTO_CHAINRECV,0,(LPARAM)&ccs);
+ ProtoChainRecv(hContact, PSR_AWAYMSG, status, (LPARAM)&pre);
SAFE_FREE((void**)&szMsg);
}
|