diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-31 11:46:05 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-31 11:46:05 +0000 |
commit | 1ce3da1cca093143d9629bc46e221dd8be962e12 (patch) | |
tree | b99d12d635a65f8c78499137137df2bd591b50be /protocols/Yahoo/src/proto.cpp | |
parent | 03512ff2ed0f3d1ed6857ee85b0eb7268931ec3f (diff) |
- MAllStrings: a handy union to hold an incoming string parameter of any type;
- FNAMECHAR: atavism extincted;
- PROTOSEARCHRESULT: structure prepared to use results of any type, including utf
git-svn-id: http://svn.miranda-ng.org/main/trunk@13932 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Yahoo/src/proto.cpp')
-rw-r--r-- | protocols/Yahoo/src/proto.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/protocols/Yahoo/src/proto.cpp b/protocols/Yahoo/src/proto.cpp index c757fa6fe7..f144d89c9b 100644 --- a/protocols/Yahoo/src/proto.cpp +++ b/protocols/Yahoo/src/proto.cpp @@ -99,7 +99,7 @@ int CYahooProto::OnModulesLoadedEx(WPARAM, LPARAM) ////////////////////////////////////////////////////////////////////////////////////////
// AddToList - adds a contact to the contact list
-MCONTACT CYahooProto::AddToList( int flags, PROTOSEARCHRESULT* psr )
+MCONTACT CYahooProto::AddToList(int flags, PROTOSEARCHRESULT *psr)
{
debugLogA("[YahooAddToList] Flags: %d", flags);
@@ -108,12 +108,13 @@ MCONTACT CYahooProto::AddToList( int flags, PROTOSEARCHRESULT* psr ) return 0;
}
- if (psr == NULL || psr->cbSize != sizeof( PROTOSEARCHRESULT )) {
+ YAHOO_SEARCH_RESULT *ysr = (YAHOO_SEARCH_RESULT*)psr;
+ if (ysr == NULL || ysr->cbSize != sizeof(YAHOO_SEARCH_RESULT)) {
debugLogA("[YahooAddToList] Empty data passed?");
return 0;
}
- char *id = psr->flags & PSR_UNICODE ? mir_utf8encodeW((wchar_t*)psr->id) : mir_utf8encode((char*)psr->id);
+ char *id = psr->flags & PSR_UNICODE ? mir_utf8encodeW((wchar_t*)psr->id.t) : mir_utf8encode((char*)psr->id.t);
MCONTACT hContact = getbuddyH(id);
if (hContact != NULL) {
if (db_get_b(hContact, "CList", "NotOnList", 0)) {
@@ -130,7 +131,7 @@ MCONTACT CYahooProto::AddToList( int flags, PROTOSEARCHRESULT* psr ) debugLogA("[YahooAddToList] Adding Temporary Buddy:%s ", id);
}
- int protocol = psr->reserved[0];
+ int protocol = ysr->protocol;
debugLogA("Adding buddy:%s", id);
hContact = add_buddy(id, id, protocol, flags);
mir_free(id);
|