From eb632a84170ea471b4a3334b951d52c9827e393b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 31 Jan 2018 22:48:49 +0300 Subject: fix for the broken message reading in NewsAggregator --- plugins/NewsAggregator/Src/NewsAggregator.cpp | 1 + plugins/NewsAggregator/Src/Services.cpp | 11 +++++++++++ plugins/NewsAggregator/Src/stdafx.h | 3 ++- 3 files changed, 14 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/NewsAggregator/Src/NewsAggregator.cpp b/plugins/NewsAggregator/Src/NewsAggregator.cpp index 57eaa475f7..bc9d91ac3a 100644 --- a/plugins/NewsAggregator/Src/NewsAggregator.cpp +++ b/plugins/NewsAggregator/Src/NewsAggregator.cpp @@ -78,6 +78,7 @@ extern "C" __declspec(dllexport) int Load(void) CreateProtoServiceFunction(MODULE, PS_LOADICON, NewsAggrLoadIcon); CreateProtoServiceFunction(MODULE, PSS_GETINFO, NewsAggrGetInfo); CreateProtoServiceFunction(MODULE, PS_GETAVATARINFO, NewsAggrGetAvatarInfo); + CreateProtoServiceFunction(MODULE, PSR_MESSAGE, NewsAggrRecvMessage); CreateServiceFunction(MS_NEWSAGGREGATOR_CHECKALLFEEDS, CheckAllFeeds); CreateServiceFunction(MS_NEWSAGGREGATOR_ADDFEED, AddFeed); diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp index 885f311fe1..1e222f9314 100644 --- a/plugins/NewsAggregator/Src/Services.cpp +++ b/plugins/NewsAggregator/Src/Services.cpp @@ -213,6 +213,17 @@ INT_PTR NewsAggrGetAvatarInfo(WPARAM wParam, LPARAM lParam) return GAIR_WAITFOR; } +INT_PTR NewsAggrRecvMessage(WPARAM, LPARAM lParam) +{ + PROTOACCOUNT *pa = Proto_GetAccount(MODULE); + if (pa && pa->ppro) { + CCSDATA *ccs = (CCSDATA*)lParam; + pa->ppro->PROTO_INTERFACE::RecvMsg(ccs->hContact, (PROTORECVEVENT*)ccs->lParam); + } + + return 0; +} + void UpdateMenu(bool State) { if (!State) // to enable auto-update diff --git a/plugins/NewsAggregator/Src/stdafx.h b/plugins/NewsAggregator/Src/stdafx.h index c5c66a8116..d9d5417d7e 100644 --- a/plugins/NewsAggregator/Src/stdafx.h +++ b/plugins/NewsAggregator/Src/stdafx.h @@ -33,6 +33,7 @@ Boston, MA 02111-1307, USA. #include #include #include +#include #include #include #include @@ -108,6 +109,7 @@ INT_PTR NewsAggrGetStatus(WPARAM/* wp*/, LPARAM/* lp*/); INT_PTR NewsAggrLoadIcon(WPARAM wParam, LPARAM lParam); INT_PTR NewsAggrGetInfo(WPARAM wParam, LPARAM lParam); INT_PTR NewsAggrGetAvatarInfo(WPARAM wParam, LPARAM lParam); +INT_PTR NewsAggrRecvMessage(WPARAM wParam, LPARAM lParam); INT_PTR CheckAllFeeds(WPARAM wParam, LPARAM lParam); INT_PTR AddFeed(WPARAM wParam, LPARAM lParam); @@ -133,7 +135,6 @@ void CheckCurrentFeed(MCONTACT hContact); void CheckCurrentFeedAvatar(MCONTACT hContact); LPCTSTR CheckFeed(wchar_t* tszURL, HWND hwndDlg); void UpdateMenu(bool State); -int ImportFeedsDialog(); LPCTSTR ClearText(CMStringW &value, const wchar_t *message); bool DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal); void CreateAuthString(char *auth, MCONTACT hContact, HWND hwndDlg); -- cgit v1.2.3