summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-01-31 22:48:49 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-01-31 22:48:57 +0300
commiteb632a84170ea471b4a3334b951d52c9827e393b (patch)
treef051dc02b81fbadae18b37fdba09375a20084b73 /plugins
parentdda0fe5570bf7cb6634eb2a1debc5088433abfdd (diff)
fix for the broken message reading in NewsAggregator
Diffstat (limited to 'plugins')
-rw-r--r--plugins/NewsAggregator/Src/NewsAggregator.cpp1
-rw-r--r--plugins/NewsAggregator/Src/Services.cpp11
-rw-r--r--plugins/NewsAggregator/Src/stdafx.h3
3 files changed, 14 insertions, 1 deletions
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 <m_langpack.h>
#include <m_options.h>
#include <m_protosvc.h>
+#include <m_protoint.h>
#include <m_database.h>
#include <m_netlib.h>
#include <m_icolib.h>
@@ -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);