summaryrefslogtreecommitdiff
path: root/plugins/MirOTR
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 14:42:51 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 14:42:51 +0000
commit33953cc6a0fab6a91af293c6838f8a46dd7922da (patch)
tree2dbbe718ad42545bde6c9f7672387827c530550a /plugins/MirOTR
parente190a7fde521bd6af9ea485cc730f854aaf38e11 (diff)
HCONTACT, part 3
git-svn-id: http://svn.miranda-ng.org/main/trunk@8081 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirOTR')
-rw-r--r--plugins/MirOTR/MirOTR/src/dbfilter.cpp2
-rw-r--r--plugins/MirOTR/MirOTR/src/options.cpp2
-rw-r--r--plugins/MirOTR/MirOTR/src/svcs_menu.cpp4
-rw-r--r--plugins/MirOTR/MirOTR/src/utils.cpp3
4 files changed, 6 insertions, 5 deletions
diff --git a/plugins/MirOTR/MirOTR/src/dbfilter.cpp b/plugins/MirOTR/MirOTR/src/dbfilter.cpp
index 443c009574..b8e6319291 100644
--- a/plugins/MirOTR/MirOTR/src/dbfilter.cpp
+++ b/plugins/MirOTR/MirOTR/src/dbfilter.cpp
@@ -281,7 +281,7 @@ int StatusModeChange(WPARAM wParam, LPARAM lParam) {
hContact = (HCONTACT)context->app_data;
if(hContact) {
- otrl_message_disconnect(otr_user_state, &ops, hContact, context->accountname, context->protocol, context->username);
+ otrl_message_disconnect(otr_user_state, &ops, (void*)hContact, context->accountname, context->protocol, context->username);
SetEncryptionStatus(hContact, TRUST_NOT_PRIVATE);
}
diff --git a/plugins/MirOTR/MirOTR/src/options.cpp b/plugins/MirOTR/MirOTR/src/options.cpp
index 7ecb6051c7..a3645f52c7 100644
--- a/plugins/MirOTR/MirOTR/src/options.cpp
+++ b/plugins/MirOTR/MirOTR/src/options.cpp
@@ -159,7 +159,7 @@ void SaveOptions() {
extern "C" void set_context_contact(void *data, ConnContext *context)
{
HCONTACT hContact = find_contact(context->username, context->protocol);
- context->app_data = hContact;
+ context->app_data = (void*)hContact;
}
void ReadPrivkeyFiles() {
diff --git a/plugins/MirOTR/MirOTR/src/svcs_menu.cpp b/plugins/MirOTR/MirOTR/src/svcs_menu.cpp
index 762ee5adf2..d764a9664b 100644
--- a/plugins/MirOTR/MirOTR/src/svcs_menu.cpp
+++ b/plugins/MirOTR/MirOTR/src/svcs_menu.cpp
@@ -16,7 +16,7 @@ int StartOTR(HCONTACT hContact) {
lib_cs_lock();
char *msg = otrl_proto_default_query_msg(MODULENAME, pol);
- otr_gui_inject_message(hContact, proto, proto, uname, msg ? msg : "?OTRv2?");
+ otr_gui_inject_message((void*)hContact, proto, proto, uname, msg ? msg : "?OTRv2?");
lib_cs_unlock();
otrl_message_free(msg);
mir_free(uname);
@@ -81,7 +81,7 @@ int otr_disconnect_contact(HCONTACT hContact)
if (!uname) return 1; // error
lib_cs_lock();
- otrl_message_disconnect(otr_user_state, &ops, hContact, proto, proto, uname);
+ otrl_message_disconnect(otr_user_state, &ops, (void*)hContact, proto, proto, uname);
lib_cs_unlock();
mir_free(uname);
return 0;
diff --git a/plugins/MirOTR/MirOTR/src/utils.cpp b/plugins/MirOTR/MirOTR/src/utils.cpp
index 3142c0852e..424f4d8886 100644
--- a/plugins/MirOTR/MirOTR/src/utils.cpp
+++ b/plugins/MirOTR/MirOTR/src/utils.cpp
@@ -49,7 +49,8 @@ ConnContext * otrl_context_find_miranda(OtrlUserState us, HCONTACT hContact)
ConnContext ** curp;
if (!hContact) return NULL;
for (curp = &(us->context_root); *curp; curp = &((*curp)->next)) {
- if ((*curp)->app_data == hContact ) return *curp;
+ if ((*curp)->app_data == (void*)hContact)
+ return *curp;
}
return NULL;
}