summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/JabberG/src/jabber_userinfo.cpp2
-rw-r--r--protocols/Tlen/src/tlen_userinfo.cpp10
2 files changed, 5 insertions, 7 deletions
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp
index 14c509c7b2..ed09582fcd 100644
--- a/protocols/JabberG/src/jabber_userinfo.cpp
+++ b/protocols/JabberG/src/jabber_userinfo.cpp
@@ -795,7 +795,7 @@ static INT_PTR CALLBACK JabberUserPhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wP
int CJabberProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam)
{
- if (!CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM)m_szModuleName))
+ if (!ProtoGetAccount(m_szModuleName))
return 0;
MCONTACT hContact = lParam;
diff --git a/protocols/Tlen/src/tlen_userinfo.cpp b/protocols/Tlen/src/tlen_userinfo.cpp
index c0ebbcffac..80304d0ddb 100644
--- a/protocols/Tlen/src/tlen_userinfo.cpp
+++ b/protocols/Tlen/src/tlen_userinfo.cpp
@@ -113,14 +113,12 @@ static void FetchField(HWND hwndDlg, UINT idCtrl, char *fieldName, char **str, i
static void FetchCombo(HWND hwndDlg, UINT idCtrl, char *fieldName, char **str, int *strSize)
{
- int value;
- char *localFieldName;
-
if (hwndDlg == NULL || fieldName == NULL || str == NULL || strSize == NULL)
return;
- value = (int) SendDlgItemMessage(hwndDlg, idCtrl, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, idCtrl, CB_GETCURSEL, 0, 0), 0);
+
+ int value = (int) SendDlgItemMessage(hwndDlg, idCtrl, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, idCtrl, CB_GETCURSEL, 0, 0), 0);
if (value > 0) {
- if ((localFieldName=TlenTextEncode(fieldName)) != NULL) {
+ if (char *localFieldName = TlenTextEncode(fieldName)) {
TlenStringAppend(str, strSize, "<%s>%d</%s>", localFieldName, value, localFieldName);
mir_free(localFieldName);
}
@@ -129,7 +127,7 @@ static void FetchCombo(HWND hwndDlg, UINT idCtrl, char *fieldName, char **str, i
int TlenProtocol::UserInfoInit(WPARAM wParam, LPARAM lParam)
{
- if (!CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM)m_szModuleName))
+ if (!ProtoGetAccount(m_szModuleName))
return 0;
MCONTACT hContact = (MCONTACT) lParam;