diff options
Diffstat (limited to 'protocols')
32 files changed, 110 insertions, 110 deletions
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp index 81416b50c4..22c6198556 100644 --- a/protocols/Gadu-Gadu/src/core.cpp +++ b/protocols/Gadu-Gadu/src/core.cpp @@ -70,8 +70,8 @@ void GaduProto::disconnect() szMsg = mir_utf8encodeW(modemsg.online);
gg_LeaveCriticalSection(&modemsg_mutex, "disconnect", 6, 1, "modemsg_mutex", 1);
if (!szMsg && !db_get_s(NULL, "SRAway", gg_status2db(ID_STATUS_ONLINE, "Default"), &dbv, DBVT_WCHAR)) {
- if (dbv.ptszVal && *(dbv.ptszVal))
- szMsg = mir_utf8encodeW(dbv.ptszVal);
+ if (dbv.pwszVal && *(dbv.pwszVal))
+ szMsg = mir_utf8encodeW(dbv.pwszVal);
db_free(&dbv);
}
break;
@@ -81,8 +81,8 @@ void GaduProto::disconnect() szMsg = mir_utf8encodeW(modemsg.away);
gg_LeaveCriticalSection(&modemsg_mutex, "disconnect", 7, 1, "modemsg_mutex", 1);
if (!szMsg && !db_get_s(NULL, "SRAway", gg_status2db(ID_STATUS_AWAY, "Default"), &dbv, DBVT_WCHAR)) {
- if (dbv.ptszVal && *(dbv.ptszVal))
- szMsg = mir_utf8encodeW(dbv.ptszVal);
+ if (dbv.pwszVal && *(dbv.pwszVal))
+ szMsg = mir_utf8encodeW(dbv.pwszVal);
db_free(&dbv);
}
break;
@@ -92,8 +92,8 @@ void GaduProto::disconnect() szMsg = mir_utf8encodeW(modemsg.dnd);
gg_LeaveCriticalSection(&modemsg_mutex, "disconnect", 8, 1, "modemsg_mutex", 1);
if (!szMsg && !db_get_s(NULL, "SRAway", gg_status2db(ID_STATUS_DND, "Default"), &dbv, DBVT_WCHAR)) {
- if (dbv.ptszVal && *(dbv.ptszVal))
- szMsg = mir_utf8encodeW(dbv.ptszVal);
+ if (dbv.pwszVal && *(dbv.pwszVal))
+ szMsg = mir_utf8encodeW(dbv.pwszVal);
db_free(&dbv);
}
break;
@@ -103,8 +103,8 @@ void GaduProto::disconnect() szMsg = mir_utf8encodeW(modemsg.freechat);
gg_LeaveCriticalSection(&modemsg_mutex, "disconnect", 9, 1, "modemsg_mutex", 1);
if (!szMsg && !db_get_s(NULL, "SRAway", gg_status2db(ID_STATUS_FREECHAT, "Default"), &dbv, DBVT_WCHAR)) {
- if (dbv.ptszVal && *(dbv.ptszVal))
- szMsg = mir_utf8encodeW(dbv.ptszVal);
+ if (dbv.pwszVal && *(dbv.pwszVal))
+ szMsg = mir_utf8encodeW(dbv.pwszVal);
db_free(&dbv);
}
break;
@@ -114,8 +114,8 @@ void GaduProto::disconnect() szMsg = mir_utf8encodeW(modemsg.invisible);
gg_LeaveCriticalSection(&modemsg_mutex, "disconnect", 10, 1, "modemsg_mutex", 1);
if (!szMsg && !db_get_s(NULL, "SRAway", gg_status2db(ID_STATUS_INVISIBLE, "Default"), &dbv, DBVT_WCHAR)) {
- if (dbv.ptszVal && *(dbv.ptszVal))
- szMsg = mir_utf8encodeW(dbv.ptszVal);
+ if (dbv.pwszVal && *(dbv.pwszVal))
+ szMsg = mir_utf8encodeW(dbv.pwszVal);
db_free(&dbv);
}
break;
@@ -881,7 +881,7 @@ retry: gce.ptszText = messageT;
wchar_t* nickT;
if (!getWString(GG_KEY_NICK, &dbv)) {
- nickT = mir_wstrdup(dbv.ptszVal);
+ nickT = mir_wstrdup(dbv.pwszVal);
db_free(&dbv);
}
else
@@ -1318,12 +1318,12 @@ int GaduProto::dbsettingchanged(WPARAM hContact, LPARAM lParam) {
// Most important... check redundancy (fucking cascading)
static int cascade = 0;
- if (!cascade && dbv.ptszVal)
+ if (!cascade && dbv.pwszVal)
{
debugLogA("dbsettingchanged(): Conference %s was renamed.", dbv.pszVal);
// Mark cascading
/* FIXME */ cascade = 1;
- Chat_ChangeSessionName(m_szModuleName, dbv.ptszVal, ptszVal);
+ Chat_ChangeSessionName(m_szModuleName, dbv.pwszVal, ptszVal);
/* FIXME */ cascade = 0;
}
db_free(&dbv);
diff --git a/protocols/Gadu-Gadu/src/dialogs.cpp b/protocols/Gadu-Gadu/src/dialogs.cpp index 64cbbea445..2c622e2551 100644 --- a/protocols/Gadu-Gadu/src/dialogs.cpp +++ b/protocols/Gadu-Gadu/src/dialogs.cpp @@ -127,8 +127,8 @@ static void SetValue(HWND hwndDlg, int idCtrl, MCONTACT hContact, char *szModule mir_snwprintf(str, L"%S", dbv.pszVal); break; case DBVT_WCHAR: - unspecified = (special == SVS_ZEROISUNSPEC && dbv.ptszVal[0] == '\0'); - ptstr = dbv.ptszVal; + unspecified = (special == SVS_ZEROISUNSPEC && dbv.pwszVal[0] == '\0'); + ptstr = dbv.pwszVal; break; case DBVT_UTF8: unspecified = (special == SVS_ZEROISUNSPEC && dbv.pszVal[0] == '\0'); diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp index 46f32e1a94..e839edf429 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -598,8 +598,8 @@ void __cdecl GaduProto::getawaymsgthread(void *arg) debugLogA("getawaymsgthread(): started");
gg_sleep(100, FALSE, "getawaymsgthread", 106, 1);
if (!db_get_s(hContact, "CList", GG_KEY_STATUSDESCR, &dbv, DBVT_WCHAR)) {
- ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal);
- debugLogW(L"getawaymsgthread(): Reading away msg <%s>.", dbv.ptszVal);
+ ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.pwszVal);
+ debugLogW(L"getawaymsgthread(): Reading away msg <%s>.", dbv.pwszVal);
db_free(&dbv);
}
else {
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp index 44e061dc72..609bc68b9f 100644 --- a/protocols/Gadu-Gadu/src/groupchat.cpp +++ b/protocols/Gadu-Gadu/src/groupchat.cpp @@ -135,7 +135,7 @@ int GaduProto::gc_event(WPARAM, LPARAM lParam) MCONTACT hNext = db_find_next(hContact);
DBVARIANT dbv;
if (!getWString(hContact, "ChatRoomID", &dbv)) {
- if (dbv.ptszVal && !mir_wstrcmp(gch->ptszID, dbv.ptszVal))
+ if (dbv.pwszVal && !mir_wstrcmp(gch->ptszID, dbv.pwszVal))
db_delete_contact(hContact);
db_free(&dbv);
}
@@ -155,7 +155,7 @@ int GaduProto::gc_event(WPARAM, LPARAM lParam) gce.ptszText = gch->ptszText;
wchar_t* nickT;
if (!getWString(GG_KEY_NICK, &dbv)) {
- nickT = mir_wstrdup(dbv.ptszVal);
+ nickT = mir_wstrdup(dbv.pwszVal);
db_free(&dbv);
}
else
diff --git a/protocols/Gadu-Gadu/src/import.cpp b/protocols/Gadu-Gadu/src/import.cpp index e461b82906..80f4bc9a28 100644 --- a/protocols/Gadu-Gadu/src/import.cpp +++ b/protocols/Gadu-Gadu/src/import.cpp @@ -33,7 +33,7 @@ char *gg_makecontacts(GaduProto *gg, int cr) DBVARIANT dbv;
if (!gg->getWString(hContact, GG_KEY_PD_FIRSTNAME, &dbv))
{
- char* pszValA = mir_u2a(dbv.ptszVal);
+ char* pszValA = mir_u2a(dbv.pwszVal);
string_append(s, dbv.pszVal);
mir_free(pszValA);
db_free(&dbv);
@@ -42,7 +42,7 @@ char *gg_makecontacts(GaduProto *gg, int cr) // Readup LastName
if (!gg->getWString(hContact, GG_KEY_PD_LASTNAME, &dbv))
{
- char* pszValA = mir_u2a(dbv.ptszVal);
+ char* pszValA = mir_u2a(dbv.pwszVal);
string_append(s, dbv.pszVal);
mir_free(pszValA);
db_free(&dbv);
@@ -52,11 +52,11 @@ char *gg_makecontacts(GaduProto *gg, int cr) // Readup Nick
if (!db_get_ws(hContact, "CList", "MyHandle", &dbv) || !gg->getWString(hContact, GG_KEY_NICK, &dbv))
{
- char* dbvA = mir_u2a(dbv.ptszVal);
+ char* dbvA = mir_u2a(dbv.pwszVal);
DBVARIANT dbv2;
if (!gg->getWString(hContact, GG_KEY_PD_NICKNAME, &dbv2))
{
- char* pszValA = mir_u2a(dbv2.ptszVal);
+ char* pszValA = mir_u2a(dbv2.pwszVal);
string_append(s, pszValA);
mir_free(pszValA);
db_free(&dbv2);
diff --git a/protocols/Gadu-Gadu/src/services.cpp b/protocols/Gadu-Gadu/src/services.cpp index f58bcc2e50..37b148c012 100644 --- a/protocols/Gadu-Gadu/src/services.cpp +++ b/protocols/Gadu-Gadu/src/services.cpp @@ -192,9 +192,9 @@ INT_PTR GaduProto::getavatarinfo(WPARAM wParam, LPARAM lParam) //directly check if contact has protected user avatar set by AVS, and if yes return it as protocol avatar
DBVARIANT dbv;
if (!db_get_ws(pai->hContact, "ContactPhoto", "Backup", &dbv)) {
- if ((mir_wstrlen(dbv.ptszVal)>0) && db_get_b(pai->hContact, "ContactPhoto", "Locked", 0)) {
+ if ((mir_wstrlen(dbv.pwszVal)>0) && db_get_b(pai->hContact, "ContactPhoto", "Locked", 0)) {
debugLogA("getavatarinfo(): Incoming request for avatar information. Contact has assigned Locked ContactPhoto. return GAIR_SUCCESS");
- wcscpy_s(pai->filename, _countof(pai->filename), dbv.ptszVal);
+ wcscpy_s(pai->filename, _countof(pai->filename), dbv.pwszVal);
pai->format = ProtoGetAvatarFormat(pai->filename);
db_free(&dbv);
return GAIR_SUCCESS;
diff --git a/protocols/ICQCorp/src/options.cpp b/protocols/ICQCorp/src/options.cpp index 380daf9b49..2b0e9f1b2c 100644 --- a/protocols/ICQCorp/src/options.cpp +++ b/protocols/ICQCorp/src/options.cpp @@ -30,11 +30,11 @@ static INT_PTR CALLBACK icqOptionsDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LP case WM_INITDIALOG:
TranslateDialogDefault(hWnd);
SetDlgItemInt(hWnd, IDC_OPT_UIN, db_get_dw(NULL, protoName, "UIN", 0), FALSE);
- if (!db_get(NULL, protoName, "Password", &dbv)) {
+ if (!db_get_s(NULL, protoName, "Password", &dbv)) {
SetDlgItemTextA(hWnd, IDC_OPT_PASSWORD, dbv.pszVal);
db_free(&dbv);
}
- if (!db_get(NULL, protoName, "Server", &dbv)) {
+ if (!db_get_s(NULL, protoName, "Server", &dbv)) {
SetDlgItemTextA(hWnd, IDC_OPT_SERVER, dbv.pszVal);
db_free(&dbv);
}
diff --git a/protocols/ICQCorp/src/protocol.cpp b/protocols/ICQCorp/src/protocol.cpp index 7faa6c832e..6fa78b0e1a 100644 --- a/protocols/ICQCorp/src/protocol.cpp +++ b/protocols/ICQCorp/src/protocol.cpp @@ -195,7 +195,7 @@ bool ICQ::logon(unsigned short logonStatus) DBVARIANT dbv;
char str[128];
- if (!db_get(NULL, protoName, "Server", &dbv)) {
+ if (!db_get_s(NULL, protoName, "Server", &dbv)) {
lstrcpyA(str, dbv.pszVal);
db_free(&dbv);
}
@@ -219,12 +219,11 @@ bool ICQ::logon(unsigned short logonStatus) updateContactList();
dwUIN = db_get_dw(NULL, protoName, "UIN", 0);
- if (!db_get(NULL, protoName, "Password", &dbv)) {
+ if (!db_get_s(NULL, protoName, "Password", &dbv)) {
lstrcpyA(str, dbv.pszVal);
db_free(&dbv);
}
-
timeStampLastMessage = 0;
sequenceVal = 1;
diff --git a/protocols/IRCG/src/clist.cpp b/protocols/IRCG/src/clist.cpp index 4c6b695325..4cffc5dd14 100644 --- a/protocols/IRCG/src/clist.cpp +++ b/protocols/IRCG/src/clist.cpp @@ -124,7 +124,7 @@ MCONTACT CIrcProto::CList_SetOffline(CONTACT *user) if (!getWString(hContact, "Default", &dbv)) {
setString(hContact, "User", "");
setString(hContact, "Host", "");
- setWString(hContact, "Nick", dbv.ptszVal);
+ setWString(hContact, "Nick", dbv.pwszVal);
setWord(hContact, "Status", ID_STATUS_OFFLINE);
db_free(&dbv);
return hContact;
@@ -149,7 +149,7 @@ bool CIrcProto::CList_SetAllOffline(BYTE ChatsToo) setWord(hContact, "Status", ID_STATUS_OFFLINE);
}
else if (!getWString(hContact, "Default", &dbv)) {
- setWString(hContact, "Nick", dbv.ptszVal);
+ setWString(hContact, "Nick", dbv.pwszVal);
setWord(hContact, "Status", ID_STATUS_OFFLINE);
db_free(&dbv);
}
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index 464ed5bea1..2d84403b90 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -156,7 +156,7 @@ VOID CALLBACK OnlineNotifTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD) if (!bAdvanced) {
db_free(&dbv);
if (!ppro->getWString(hContact, "Nick", &dbv)) {
- ppro->m_namesToUserhost += CMStringW(dbv.ptszVal) + L" ";
+ ppro->m_namesToUserhost += CMStringW(dbv.pwszVal) + L" ";
db_free(&dbv);
}
}
@@ -167,9 +167,9 @@ VOID CALLBACK OnlineNotifTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD) wchar_t* DBNick = nullptr;
wchar_t* DBWildcard = nullptr;
if (!ppro->getWString(hContact, "Nick", &dbv))
- DBNick = dbv.ptszVal;
+ DBNick = dbv.pwszVal;
if (!ppro->getWString(hContact, "UWildcard", &dbv2))
- DBWildcard = dbv2.ptszVal;
+ DBWildcard = dbv2.pwszVal;
if (DBNick && (!DBWildcard || !WCCmp(CharLower(DBWildcard), CharLower(DBNick))))
ppro->m_namesToWho += CMStringW(DBNick) + L" ";
@@ -1366,7 +1366,7 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage *pmsg) int k = 0;
while (!command.IsEmpty()) {
- command = GetWord(dbv.ptszVal, k);
+ command = GetWord(dbv.pwszVal, k);
k++;
if (!command.IsEmpty()) {
CMStringW S = command.Mid(1);
@@ -1378,7 +1378,7 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage *pmsg) }
if (!command.IsEmpty()) {
- save += GetWordAddress(dbv.ptszVal, k);
+ save += GetWordAddress(dbv.pwszVal, k);
switch (command[0]) {
case 'M':
Chat_Control(m_szModuleName, sID, WINDOW_HIDDEN);
@@ -1743,17 +1743,17 @@ bool CIrcProto::OnIrc_WHOIS_NO_USER(const CIrcMessage *pmsg) DBVARIANT dbv;
if (!getWString(hContact, "Default", &dbv)) {
- setWString(hContact, "Nick", dbv.ptszVal);
+ setWString(hContact, "Nick", dbv.pwszVal);
DBVARIANT dbv2;
if (getByte(hContact, "AdvancedMode", 0) == 0)
- DoUserhostWithReason(1, ((CMStringW)L"S" + dbv.ptszVal), true, dbv.ptszVal);
+ DoUserhostWithReason(1, ((CMStringW)L"S" + dbv.pwszVal), true, dbv.pwszVal);
else {
if (!getWString(hContact, "UWildcard", &dbv2)) {
- DoUserhostWithReason(2, ((CMStringW)L"S" + dbv2.ptszVal), true, dbv2.ptszVal);
+ DoUserhostWithReason(2, ((CMStringW)L"S" + dbv2.pwszVal), true, dbv2.pwszVal);
db_free(&dbv2);
}
- else DoUserhostWithReason(2, ((CMStringW)L"S" + dbv.ptszVal), true, dbv.ptszVal);
+ else DoUserhostWithReason(2, ((CMStringW)L"S" + dbv.pwszVal), true, dbv.pwszVal);
}
setString(hContact, "User", "");
setString(hContact, "Host", "");
@@ -1811,7 +1811,7 @@ bool CIrcProto::OnIrc_JOINERROR(const CIrcMessage *pmsg) int i = 0;
while (!command.IsEmpty()) {
- command = GetWord(dbv.ptszVal, i);
+ command = GetWord(dbv.pwszVal, i);
i++;
if (!command.IsEmpty() && pmsg->parameters[0] == command.Mid(1))
@@ -2390,8 +2390,8 @@ int CIrcProto::DoPerform(const char* event) DBVARIANT dbv;
if (!getWString(sSetting, &dbv)) {
- if (!my_strstri(dbv.ptszVal, L"/away"))
- PostIrcMessageWnd(nullptr, NULL, dbv.ptszVal);
+ if (!my_strstri(dbv.pwszVal, L"/away"))
+ PostIrcMessageWnd(nullptr, NULL, dbv.pwszVal);
else
mir_forkthread(AwayWarningThread);
db_free(&dbv);
diff --git a/protocols/IRCG/src/input.cpp b/protocols/IRCG/src/input.cpp index 169dbc4153..f7cf3b6f84 100644 --- a/protocols/IRCG/src/input.cpp +++ b/protocols/IRCG/src/input.cpp @@ -51,7 +51,7 @@ void CIrcProto::FormatMsg(CMStringW& text) if (sNick4Perform == L"") {
DBVARIANT dbv;
if (!getWString("PNick", &dbv)) {
- sNick4Perform = dbv.ptszVal;
+ sNick4Perform = dbv.pwszVal;
db_free(&dbv);
}
}
@@ -549,8 +549,8 @@ BOOL CIrcProto::DoHardcodedCommand(CMStringW text, wchar_t *window, MCONTACT hCo DBVARIANT dbv1;
if (!getWString(hContact, "UWildcard", &dbv1)) {
CMStringW S = L"S";
- S += dbv1.ptszVal;
- DoUserhostWithReason(2, S.c_str(), true, dbv1.ptszVal);
+ S += dbv1.pwszVal;
+ DoUserhostWithReason(2, S.c_str(), true, dbv1.pwszVal);
db_free(&dbv1);
}
else {
@@ -624,8 +624,8 @@ BOOL CIrcProto::DoHardcodedCommand(CMStringW text, wchar_t *window, MCONTACT hCo DBVARIANT dbv1;
CMStringW S = L"S";
if (!getWString(ccNew, "UWildcard", &dbv1)) {
- S += dbv1.ptszVal;
- DoUserhostWithReason(2, S.c_str(), true, dbv1.ptszVal);
+ S += dbv1.pwszVal;
+ DoUserhostWithReason(2, S.c_str(), true, dbv1.pwszVal);
db_free(&dbv1);
}
else {
@@ -804,7 +804,7 @@ bool CIrcProto::PostIrcMessageWnd(wchar_t *window, MCONTACT hContact, const wcha return 0;
if (hContact && !getWString(hContact, "Nick", &dbv)) {
- mir_wstrncpy(windowname, dbv.ptszVal, 255);
+ mir_wstrncpy(windowname, dbv.pwszVal, 255);
db_free(&dbv);
}
else if (window)
diff --git a/protocols/IRCG/src/irclib.cpp b/protocols/IRCG/src/irclib.cpp index 04b56f2c6a..96426b287e 100644 --- a/protocols/IRCG/src/irclib.cpp +++ b/protocols/IRCG/src/irclib.cpp @@ -527,7 +527,7 @@ CDccSession* CIrcProto::FindDCCRecvByPortAndName(int iPort, const wchar_t* szNam for (auto &p : m_dcc_xfers) { DBVARIANT dbv; if (!getWString(p->di->hContact, "Nick", &dbv)) { - if (p->di->iType == DCC_SEND && !p->di->bSender && !mir_wstrcmpi(szName, dbv.ptszVal) && iPort == p->di->iPort) { + if (p->di->iType == DCC_SEND && !p->di->bSender && !mir_wstrcmpi(szName, dbv.pwszVal) && iPort == p->di->iPort) { db_free(&dbv); return p; } diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index f4c42f4e80..096ed5b1c8 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -250,7 +250,7 @@ void CIrcProto::OnModulesLoaded() if (!getWString(*it, &dbv)) {
db_unset(NULL, m_szModuleName, *it);
it->MakeUpper();
- setWString(*it, dbv.ptszVal);
+ setWString(*it, dbv.pwszVal);
db_free(&dbv);
}
}
@@ -302,8 +302,8 @@ MCONTACT CIrcProto::AddToList(int, PROTOSEARCHRESULT* psr) }
else {
if (!getWString(hContact, "UWildcard", &dbv1)) {
- S += dbv1.ptszVal;
- DoUserhostWithReason(2, S, true, dbv1.ptszVal);
+ S += dbv1.pwszVal;
+ DoUserhostWithReason(2, S, true, dbv1.pwszVal);
db_free(&dbv1);
}
else {
@@ -556,7 +556,7 @@ HANDLE CIrcProto::SendFile(MCONTACT hContact, const wchar_t*, wchar_t** ppszFile }
dci->hContact = hContact;
- dci->sContactName = dbv.ptszVal;
+ dci->sContactName = dbv.pwszVal;
dci->iType = DCC_SEND;
dci->bReverse = m_DCCPassive ? true : false;
dci->bSender = true;
@@ -772,7 +772,7 @@ HANDLE CIrcProto::GetAwayMsg(MCONTACT hContact) return nullptr;
}
CMStringW S = L"WHOIS ";
- S += dbv.ptszVal;
+ S += dbv.pwszVal;
if (IsConnected())
SendIrcMessage(S.c_str(), false);
db_free(&dbv);
diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp index a1ae6248a0..d1e155fd9d 100644 --- a/protocols/IRCG/src/options.cpp +++ b/protocols/IRCG/src/options.cpp @@ -62,11 +62,11 @@ void CIrcProto::ReadSettings(TDbSetting* sets, int count) case DBVT_WCHAR:
if (!getWString(p->name, &dbv)) {
if (p->size != -1) {
- size_t len = min(p->size - 1, mir_wstrlen(dbv.ptszVal));
+ size_t len = min(p->size - 1, mir_wstrlen(dbv.pwszVal));
memcpy(ptr, dbv.pszVal, len*sizeof(wchar_t));
*(wchar_t*)&ptr[len*sizeof(wchar_t)] = 0;
}
- else *(wchar_t**)ptr = mir_wstrdup(dbv.ptszVal);
+ else *(wchar_t**)ptr = mir_wstrdup(dbv.pwszVal);
db_free(&dbv);
}
else {
@@ -1177,7 +1177,7 @@ void COtherPrefsDlg::addPerformComboValue(int idx, const char* szValueName) PERFORM_INFO* pPref;
DBVARIANT dbv;
if (!m_proto->getWString(sSetting.c_str(), &dbv)) {
- pPref = new PERFORM_INFO(sSetting.c_str(), dbv.ptszVal);
+ pPref = new PERFORM_INFO(sSetting.c_str(), dbv.pwszVal);
db_free(&dbv);
}
else pPref = new PERFORM_INFO(sSetting.c_str(), L"");
@@ -1363,9 +1363,9 @@ void CIrcProto::InitIgnore(void) if (getWString(settingName, &dbv))
break;
- CMStringW mask = GetWord(dbv.ptszVal, 0);
- CMStringW flags = GetWord(dbv.ptszVal, 1);
- CMStringW network = GetWord(dbv.ptszVal, 2);
+ CMStringW mask = GetWord(dbv.pwszVal, 0);
+ CMStringW flags = GetWord(dbv.pwszVal, 1);
+ CMStringW network = GetWord(dbv.pwszVal, 2);
m_ignoreItems.insert(new CIrcIgnoreItem(mask.c_str(), flags.c_str(), network.c_str()));
db_free(&dbv);
}
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index 01824a8e25..d1d79044e8 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -183,12 +183,12 @@ void CIrcProto::OnContactDeleted(MCONTACT hContact) if (type != 0) {
CMStringW S;
if (type == GCW_CHATROOM)
- S = MakeWndID(dbv.ptszVal);
+ S = MakeWndID(dbv.pwszVal);
if (type == GCW_SERVER)
S = SERVERWINDOW;
int i = Chat_Terminate(m_szModuleName, S);
if (i && type == GCW_CHATROOM)
- PostIrcMessage(L"/PART %s %s", dbv.ptszVal, m_userInfo);
+ PostIrcMessage(L"/PART %s %s", dbv.pwszVal, m_userInfo);
}
else {
BYTE bDCC = getByte(hContact, "DCC", 0);
@@ -211,7 +211,7 @@ INT_PTR __cdecl CIrcProto::OnJoinChat(WPARAM wp, LPARAM) DBVARIANT dbv;
if (!getWString((MCONTACT)wp, "Nick", &dbv)) {
if (getByte((MCONTACT)wp, "ChatRoom", 0) == GCW_CHATROOM)
- PostIrcMessage(L"/JOIN %s", dbv.ptszVal);
+ PostIrcMessage(L"/JOIN %s", dbv.pwszVal);
db_free(&dbv);
}
return 0;
@@ -225,8 +225,8 @@ INT_PTR __cdecl CIrcProto::OnLeaveChat(WPARAM wp, LPARAM) DBVARIANT dbv;
if (!getWString((MCONTACT)wp, "Nick", &dbv)) {
if (getByte((MCONTACT)wp, "ChatRoom", 0) == GCW_CHATROOM) {
- PostIrcMessage(L"/PART %s %s", dbv.ptszVal, m_userInfo);
- Chat_Terminate(m_szModuleName, MakeWndID(dbv.ptszVal));
+ PostIrcMessage(L"/PART %s %s", dbv.pwszVal, m_userInfo);
+ Chat_Terminate(m_szModuleName, MakeWndID(dbv.pwszVal));
}
db_free(&dbv);
}
@@ -241,7 +241,7 @@ INT_PTR __cdecl CIrcProto::OnMenuChanSettings(WPARAM wp, LPARAM) MCONTACT hContact = (MCONTACT)wp;
DBVARIANT dbv;
if (!getWString(hContact, "Nick", &dbv)) {
- PostIrcMessageWnd(dbv.ptszVal, NULL, L"/CHANNELMANAGER");
+ PostIrcMessageWnd(dbv.pwszVal, NULL, L"/CHANNELMANAGER");
db_free(&dbv);
}
return 0;
@@ -255,7 +255,7 @@ INT_PTR __cdecl CIrcProto::OnMenuWhois(WPARAM wp, LPARAM) DBVARIANT dbv;
if (!getWString((MCONTACT)wp, "Nick", &dbv)) {
- PostIrcMessage(L"/WHOIS %s %s", dbv.ptszVal, dbv.ptszVal);
+ PostIrcMessage(L"/WHOIS %s %s", dbv.pwszVal, dbv.pwszVal);
db_free(&dbv);
}
return 0;
@@ -540,7 +540,7 @@ int __cdecl CIrcProto::GCEventHook(WPARAM, LPARAM lParam) {
DBVARIANT dbv;
if (!getWString("Nick", &dbv)) {
- PostIrcMessage(L"/nickserv SENDPASS %s", dbv.ptszVal);
+ PostIrcMessage(L"/nickserv SENDPASS %s", dbv.pwszVal);
db_free(&dbv);
}
}
@@ -917,7 +917,7 @@ int __cdecl CIrcProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam) DBVARIANT dbv;
if (!getWString(hContact, "Nick", &dbv)) {
if (getByte("MirVerAutoRequest", 1))
- PostIrcMessage(L"/PRIVMSG %s \001VERSION\001", dbv.ptszVal);
+ PostIrcMessage(L"/PRIVMSG %s \001VERSION\001", dbv.pwszVal);
db_free(&dbv);
}
}
diff --git a/protocols/IRCG/src/tools.cpp b/protocols/IRCG/src/tools.cpp index 311e5bf494..740a331842 100644 --- a/protocols/IRCG/src/tools.cpp +++ b/protocols/IRCG/src/tools.cpp @@ -42,7 +42,7 @@ void CIrcProto::AddToJTemp(wchar_t op, CMStringW& sCommand) DBVARIANT dbv;
if (!getWString("JTemp", &dbv)) {
- res = CMStringW(dbv.ptszVal) + L" " + res;
+ res = CMStringW(dbv.pwszVal) + L" " + res;
db_free(&dbv);
}
diff --git a/protocols/IRCG/src/userinfo.cpp b/protocols/IRCG/src/userinfo.cpp index fc50e5ae56..1d93cab326 100644 --- a/protocols/IRCG/src/userinfo.cpp +++ b/protocols/IRCG/src/userinfo.cpp @@ -65,25 +65,25 @@ INT_PTR CALLBACK UserDetailsDlgProc(HWND m_hwnd, UINT msg, WPARAM wParam, LPARAM if (!bAdvanced) {
SetDlgItemText(m_hwnd, IDC_DEFAULT, TranslateW(STR_BASIC));
if (!p->ppro->getWString(p->hContact, "Default", &dbv)) {
- SetDlgItemText(m_hwnd, IDC_WILDCARD, dbv.ptszVal);
+ SetDlgItemText(m_hwnd, IDC_WILDCARD, dbv.pwszVal);
db_free(&dbv);
}
}
else {
SetDlgItemText(m_hwnd, IDC_DEFAULT, TranslateW(STR_ADVANCED));
if (!p->ppro->getWString(p->hContact, "UWildcard", &dbv)) {
- SetDlgItemText(m_hwnd, IDC_WILDCARD, dbv.ptszVal);
+ SetDlgItemText(m_hwnd, IDC_WILDCARD, dbv.pwszVal);
db_free(&dbv);
}
}
if (!p->ppro->getWString(p->hContact, "UUser", &dbv)) {
- SetDlgItemText(m_hwnd, IDC_USER, dbv.ptszVal);
+ SetDlgItemText(m_hwnd, IDC_USER, dbv.pwszVal);
db_free(&dbv);
}
if (!p->ppro->getWString(p->hContact, "UHost", &dbv)) {
- SetDlgItemText(m_hwnd, IDC_HOST, dbv.ptszVal);
+ SetDlgItemText(m_hwnd, IDC_HOST, dbv.pwszVal);
db_free(&dbv);
}
ProtoBroadcastAck(p->ppro->m_szModuleName, p->hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1, 0);
@@ -115,9 +115,9 @@ INT_PTR CALLBACK UserDetailsDlgProc(HWND m_hwnd, UINT msg, WPARAM wParam, LPARAM if (!p->ppro->getWString(p->hContact, "Default", &dbv)) {
CMStringW S = STR_ERROR;
S += L" (";
- S += dbv.ptszVal;
+ S += dbv.pwszVal;
S += L")";
- if ((mir_wstrlen(temp) < 4 && mir_wstrlen(temp)) || !WCCmp(CharLower(temp), CharLower(dbv.ptszVal))) {
+ if ((mir_wstrlen(temp) < 4 && mir_wstrlen(temp)) || !WCCmp(CharLower(temp), CharLower(dbv.pwszVal))) {
MessageBox(nullptr, TranslateW(S.c_str()), TranslateT("IRC error"), MB_OK | MB_ICONERROR);
db_free(&dbv);
return FALSE;
@@ -166,7 +166,7 @@ INT_PTR CALLBACK UserDetailsDlgProc(HWND m_hwnd, UINT msg, WPARAM wParam, LPARAM DBVARIANT dbv;
if (!p->ppro->getWString(p->hContact, "Default", &dbv)) {
- SetDlgItemText(m_hwnd, IDC_WILDCARD, dbv.ptszVal);
+ SetDlgItemText(m_hwnd, IDC_WILDCARD, dbv.pwszVal);
db_free(&dbv);
}
EnableWindow(GetDlgItem(m_hwnd, IDC_WILDCARD), FALSE);
@@ -176,7 +176,7 @@ INT_PTR CALLBACK UserDetailsDlgProc(HWND m_hwnd, UINT msg, WPARAM wParam, LPARAM DBVARIANT dbv;
SetDlgItemText(m_hwnd, IDC_DEFAULT, TranslateW(STR_ADVANCED));
if (!p->ppro->getWString(p->hContact, "UWildcard", &dbv)) {
- SetDlgItemText(m_hwnd, IDC_WILDCARD, dbv.ptszVal);
+ SetDlgItemText(m_hwnd, IDC_WILDCARD, dbv.pwszVal);
db_free(&dbv);
}
EnableWindow(GetDlgItem(m_hwnd, IDC_WILDCARD), true);
@@ -201,7 +201,7 @@ int __cdecl CIrcProto::OnInitUserInfo(WPARAM wParam, LPARAM lParam) DBVARIANT dbv;
if (!getWString(hContact, "Default", &dbv)) {
- if (IsChannel(dbv.ptszVal)) {
+ if (IsChannel(dbv.pwszVal)) {
db_free(&dbv);
return 0;
}
diff --git a/protocols/IRCG/src/windows.cpp b/protocols/IRCG/src/windows.cpp index b921af9029..728c451996 100644 --- a/protocols/IRCG/src/windows.cpp +++ b/protocols/IRCG/src/windows.cpp @@ -215,8 +215,8 @@ bool CNickDlg::OnInitDialog() DBVARIANT dbv;
if (!m_proto->getWString("RecentNicks", &dbv)) {
for (int i = 0; i < 10; i++)
- if (!GetWord(dbv.ptszVal, i).IsEmpty())
- SendDlgItemMessage(m_hwnd, IDC_ENICK, CB_ADDSTRING, 0, (LPARAM)GetWord(dbv.ptszVal, i).c_str());
+ if (!GetWord(dbv.pwszVal, i).IsEmpty())
+ SendDlgItemMessage(m_hwnd, IDC_ENICK, CB_ADDSTRING, 0, (LPARAM)GetWord(dbv.pwszVal, i).c_str());
db_free(&dbv);
}
@@ -239,7 +239,7 @@ void CNickDlg::OnOk(CCtrlButton*) DBVARIANT dbv;
if (!m_proto->getWString("RecentNicks", &dbv)) {
for (int i = 0; i < 10; i++) {
- CMStringW s = GetWord(dbv.ptszVal, i);
+ CMStringW s = GetWord(dbv.pwszVal, i);
if (!s.IsEmpty() && s != szTemp)
S += L" " + s;
}
@@ -509,8 +509,8 @@ bool CJoinDlg::OnInitDialog() DBVARIANT dbv;
if (!m_proto->getWString("RecentChannels", &dbv)) {
for (int i = 0; i < 20; i++) {
- if (!GetWord(dbv.ptszVal, i).IsEmpty()) {
- CMStringW S = GetWord(dbv.ptszVal, i);
+ if (!GetWord(dbv.pwszVal, i).IsEmpty()) {
+ CMStringW S = GetWord(dbv.pwszVal, i);
S.Replace(L"%newl", L" ");
SendDlgItemMessage(m_hwnd, IDC_ENICK, CB_ADDSTRING, 0, (LPARAM)S.c_str());
}
@@ -542,7 +542,7 @@ void CJoinDlg::OnOk(CCtrlButton*) DBVARIANT dbv;
if (!m_proto->getWString("RecentChannels", &dbv)) {
for (int i = 0; i < 20; i++) {
- CMStringW W = GetWord(dbv.ptszVal, i);
+ CMStringW W = GetWord(dbv.pwszVal, i);
if (!W.IsEmpty() && W != SL)
S += L" " + W;
}
@@ -1292,7 +1292,7 @@ void CManagerDlg::InitManager(int mode, const wchar_t* window) DBVARIANT dbv;
if (!m_proto->getWString(p, &dbv)) {
for (int i = 0; i < 5; i++) {
- CMStringW S = GetWord(dbv.ptszVal, i);
+ CMStringW S = GetWord(dbv.pwszVal, i);
if (!S.IsEmpty()) {
/* FIXME: What the hell does it mean!? GCC won't compile this on UNICODE */
#if !defined(__GNUC__) || !defined(UNICODE)
diff --git a/protocols/IcqOscarJ/src/icq_avatar.cpp b/protocols/IcqOscarJ/src/icq_avatar.cpp index aabdf34ac5..eb747258d0 100644 --- a/protocols/IcqOscarJ/src/icq_avatar.cpp +++ b/protocols/IcqOscarJ/src/icq_avatar.cpp @@ -61,7 +61,7 @@ wchar_t* CIcqProto::GetOwnAvatarFileName() return nullptr;
wchar_t tmp[MAX_PATH * 2];
- PathToAbsoluteW(dbvFile.ptszVal, tmp);
+ PathToAbsoluteW(dbvFile.pwszVal, tmp);
db_free(&dbvFile);
return null_strdup(tmp);
diff --git a/protocols/IcqOscarJ/src/icq_db.cpp b/protocols/IcqOscarJ/src/icq_db.cpp index 5f6a58d951..4026cb3acf 100644 --- a/protocols/IcqOscarJ/src/icq_db.cpp +++ b/protocols/IcqOscarJ/src/icq_db.cpp @@ -170,7 +170,7 @@ void CIcqProto::setStatusMsgVar(MCONTACT hContact, char* szStatusMsg, bool isAns char *oldStatusMsg = nullptr;
DBVARIANT dbv;
if (!db_get_ws(hContact, "CList", "StatusMsg", &dbv)) {
- oldStatusMsg = make_utf8_string(dbv.ptszVal);
+ oldStatusMsg = make_utf8_string(dbv.pwszVal);
db_free(&dbv);
}
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index c75b40b146..e29c547cdf 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -906,8 +906,8 @@ int CJabberProto::OnProcessSrmmEvent(WPARAM, LPARAM lParam) WindowList_Remove(hDialogsList, event->hwndWindow);
DBVARIANT dbv;
- BOOL bSupportTyping = FALSE;
- if (!db_get(event->hContact, "SRMsg", "SupportTyping", &dbv)) {
+ bool bSupportTyping = false;
+ if (!db_get_b(event->hContact, "SRMsg", "SupportTyping")) {
bSupportTyping = dbv.bVal == 1;
db_free(&dbv);
}
@@ -915,6 +915,7 @@ int CJabberProto::OnProcessSrmmEvent(WPARAM, LPARAM lParam) bSupportTyping = dbv.bVal == 1;
db_free(&dbv);
}
+
if (!bSupportTyping || !m_bJabberOnline)
return 0;
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp index d6ca2c6574..da212ffd72 100644 --- a/protocols/MRA/src/Mra_functions.cpp +++ b/protocols/MRA/src/Mra_functions.cpp @@ -1141,7 +1141,7 @@ INT_PTR CALLBACK SendReplyBlogStatusDlgProc(HWND hWndDlg, UINT message, WPARAM w dbv.type = DBVT_BLOB;
dbv.pbVal = (PBYTE)&dwBlogStatusID;
dbv.cpbVal = sizeof(DWORDLONG);
- db_get(dat->hContact, dat->ppro->m_szModuleName, DBSETTING_BLOGSTATUSID, &dbv);
+ db_set(dat->hContact, dat->ppro->m_szModuleName, DBSETTING_BLOGSTATUSID, &dbv);
}
else {
dwFlags = MRIM_BLOG_STATUS_UPDATE;
diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp index 4278ebc8c0..7405e4a4b3 100644 --- a/protocols/MSN/src/msn_chat.cpp +++ b/protocols/MSN/src/msn_chat.cpp @@ -481,7 +481,7 @@ int CMsnProto::MSN_GCEventHook(WPARAM, LPARAM lParam) GCEVENT gce = { m_szModuleName, gch->ptszID, GC_EVENT_MESSAGE };
gce.dwFlags = GCEF_ADDTOLOG;
- gce.ptszNick = bError ? L"" : dbv.ptszVal;
+ gce.ptszNick = bError ? L"" : dbv.pwszVal;
gce.ptszUID = mir_a2u(MyOptions.szEmail);
gce.time = time(0);
gce.ptszText = gch->ptszText;
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index 7422a9ee3d..3989e25b5f 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -314,11 +314,11 @@ void CMsnProto::MSN_GetCustomSmileyFileName(MCONTACT hContact, wchar_t* pszDest, DBVARIANT dbv = { 0 };
if (getWString(hContact, "e-mail", &dbv)) {
dbv.type = DBVT_ASCIIZ;
- dbv.ptszVal = (wchar_t*)mir_alloc(11*sizeof(wchar_t));
- _ui64tow((UINT_PTR)hContact, dbv.ptszVal, 10);
+ dbv.pwszVal = (wchar_t*)mir_alloc(11*sizeof(wchar_t));
+ _ui64tow((UINT_PTR)hContact, dbv.pwszVal, 10);
}
- tPathLen += mir_snwprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%s", dbv.ptszVal);
+ tPathLen += mir_snwprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%s", dbv.pwszVal);
db_free(&dbv);
}
else {
diff --git a/protocols/MSN/src/msn_opts.cpp b/protocols/MSN/src/msn_opts.cpp index 5f2f881d1c..570fe40dab 100644 --- a/protocols/MSN/src/msn_opts.cpp +++ b/protocols/MSN/src/msn_opts.cpp @@ -99,7 +99,7 @@ static INT_PTR CALLBACK DlgProcMsnOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP HWND wnd = GetDlgItem(hwndDlg, IDC_HANDLE2);
DBVARIANT dbv;
if (!proto->getWString("Nick", &dbv)) {
- SetWindowText(wnd, dbv.ptszVal);
+ SetWindowText(wnd, dbv.pwszVal);
db_free(&dbv);
}
EnableWindow(wnd, proto->msnLoggedIn);
@@ -491,7 +491,7 @@ static INT_PTR CALLBACK DlgProcAccMgrUI(HWND hwndDlg, UINT msg, WPARAM wParam, L DBVARIANT dbv;
if (!proto->getWString("Place", &dbv)) {
- SetDlgItemText(hwndDlg, IDC_PLACE, dbv.ptszVal);
+ SetDlgItemText(hwndDlg, IDC_PLACE, dbv.pwszVal);
db_free(&dbv);
}
}
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index 567facc9e4..44b38db537 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -606,7 +606,7 @@ void __cdecl CMsnProto::MsnGetAwayMsgThread(void* arg) AwayMsgInfo *inf = (AwayMsgInfo*)arg;
DBVARIANT dbv;
if (!db_get_ws(inf->hContact, "CList", "StatusMsg", &dbv)) {
- ProtoBroadcastAck(inf->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)inf->id, (LPARAM)dbv.ptszVal);
+ ProtoBroadcastAck(inf->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)inf->id, (LPARAM)dbv.pwszVal);
db_free(&dbv);
}
else ProtoBroadcastAck(inf->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)inf->id, 0);
diff --git a/protocols/MSN/src/msn_svcs.cpp b/protocols/MSN/src/msn_svcs.cpp index 1bdb6cac2e..9b5ce2fdda 100644 --- a/protocols/MSN/src/msn_svcs.cpp +++ b/protocols/MSN/src/msn_svcs.cpp @@ -253,7 +253,7 @@ void CMsnProto::OnContactDeleted(MCONTACT hContact) if (isChatRoom(hContact)) {
DBVARIANT dbv;
if (!getWString(hContact, "ChatRoomID", &dbv)) {
- MSN_KillChatSession(dbv.ptszVal);
+ MSN_KillChatSession(dbv.pwszVal);
db_free(&dbv);
}
}
@@ -429,7 +429,7 @@ INT_PTR CMsnProto::OnLeaveChat(WPARAM hContact, LPARAM) if (isChatRoom(hContact) != 0) {
DBVARIANT dbv;
if (getWString(hContact, "ChatRoomID", &dbv) == 0) {
- MSN_KillChatSession(dbv.ptszVal);
+ MSN_KillChatSession(dbv.pwszVal);
db_free(&dbv);
}
}
diff --git a/protocols/Sametime/src/userlist.cpp b/protocols/Sametime/src/userlist.cpp index 1d01d15e24..a16ed8d103 100644 --- a/protocols/Sametime/src/userlist.cpp +++ b/protocols/Sametime/src/userlist.cpp @@ -636,7 +636,7 @@ void CSametimeProto::UserRecvAwayMessage(MCONTACT hContact) debugLogW(L"CSametimeProto::UserRecvAwayMessage() start hContact=[%x]", hContact);
DBVARIANT dbv;
if (!db_get_s((MCONTACT)hContact, "CList", "StatusMsg", &dbv, DBVT_WCHAR)) {
- ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal);
+ ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.pwszVal);
db_free(&dbv);
}
else ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)NULL);
diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp index 14a718b391..2fb2d0b445 100644 --- a/protocols/SkypeWeb/src/skype_contacts.cpp +++ b/protocols/SkypeWeb/src/skype_contacts.cpp @@ -78,7 +78,7 @@ MCONTACT CSkypeProto::AddContact(const char *skypename, bool isTemporary) DBVARIANT dbv;
if (!getWString(SKYPE_SETTINGS_GROUP, &dbv)) {
- db_set_ws(hContact, "CList", "Group", dbv.ptszVal);
+ db_set_ws(hContact, "CList", "Group", dbv.pwszVal);
db_free(&dbv);
}
diff --git a/protocols/Twitter/src/connection.cpp b/protocols/Twitter/src/connection.cpp index 28bb28b4e3..af7f0774ab 100644 --- a/protocols/Twitter/src/connection.cpp +++ b/protocols/Twitter/src/connection.cpp @@ -177,7 +177,7 @@ bool TwitterProto::NegotiateConnection() }
if (!getWString(TWITTER_KEY_GROUP, &dbv)) {
- Clist_GroupCreate(0, dbv.ptszVal);
+ Clist_GroupCreate(0, dbv.pwszVal);
db_free(&dbv);
}
@@ -401,7 +401,7 @@ void TwitterProto::UpdateAvatarWorker(void *p) return;
std::string ext = data->url.substr(data->url.rfind('.')); // finds the filetype of the avatar
- std::wstring filename = GetAvatarFolder() + L'\\' + dbv.ptszVal + (wchar_t*)_A2T(ext.c_str()); // local filename and path
+ std::wstring filename = GetAvatarFolder() + L'\\' + dbv.pwszVal + (wchar_t*)_A2T(ext.c_str()); // local filename and path
db_free(&dbv);
PROTO_AVATAR_INFORMATION ai = { 0 };
@@ -537,7 +537,7 @@ void TwitterProto::ShowContactPopup(MCONTACT hContact, const std::string &text, DBVARIANT dbv;
if (!db_get_ws(hContact, "CList", "MyHandle", &dbv) || !getWString(hContact, TWITTER_KEY_UN, &dbv)) {
- wcsncpy(popup.lptzContactName, dbv.ptszVal, MAX_CONTACTNAME);
+ wcsncpy(popup.lptzContactName, dbv.pwszVal, MAX_CONTACTNAME);
db_free(&dbv);
}
diff --git a/protocols/Twitter/src/contacts.cpp b/protocols/Twitter/src/contacts.cpp index 3545862b9c..99c08ac1e9 100644 --- a/protocols/Twitter/src/contacts.cpp +++ b/protocols/Twitter/src/contacts.cpp @@ -163,7 +163,7 @@ void TwitterProto::GetAwayMsgWorker(void *arg) DBVARIANT dbv;
if (!db_get_ws(hContact, "CList", "StatusMsg", &dbv)) {
- ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal);
+ ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.pwszVal);
db_free(&dbv);
}
else ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_FAILED, (HANDLE)1, 0);
@@ -252,7 +252,7 @@ MCONTACT TwitterProto::AddToClientList(const char *name, const char *status) Skin_PlaySound("TwitterNewContact");
DBVARIANT dbv;
if (!getWString(TWITTER_KEY_GROUP, &dbv)) {
- db_set_ws(hContact, "CList", "Group", dbv.ptszVal);
+ db_set_ws(hContact, "CList", "Group", dbv.pwszVal);
db_free(&dbv);
}
diff --git a/protocols/Twitter/src/ui.cpp b/protocols/Twitter/src/ui.cpp index d7164be99e..ffc6eb818a 100644 --- a/protocols/Twitter/src/ui.cpp +++ b/protocols/Twitter/src/ui.cpp @@ -40,7 +40,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM DBVARIANT dbv;
if (!proto->getWString(TWITTER_KEY_GROUP, &dbv)) {
- SetDlgItemText(hwndDlg, IDC_GROUP, dbv.ptszVal);
+ SetDlgItemText(hwndDlg, IDC_GROUP, dbv.pwszVal);
db_free(&dbv);
}
else SetDlgItemText(hwndDlg, IDC_GROUP, L"Twitter");
|