From bd33df2d4b9534d2241283f2b20d83f5b1811ebc Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 29 Jan 2015 21:36:42 +0000 Subject: media files detection git-svn-id: http://svn.miranda-ng.org/main/trunk@11954 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp') diff --git a/protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp b/protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp index e3c3367b04..d5b5189b44 100644 --- a/protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp +++ b/protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp @@ -18,9 +18,8 @@ FMessage::FMessage() : this->latitude = 0; this->media_duration_seconds = 0; this->media_size = 0; - this->media_name = ""; - this->media_url = ""; - this->data = ""; + this->bindata = 0; + this->bindata_len = 0; } FMessage::FMessage(const std::string &remote_jid, bool from_me, const std::string &id) : @@ -32,8 +31,8 @@ FMessage::FMessage(const std::string &remote_jid, bool from_me, const std::strin this->latitude = 0; this->media_duration_seconds = 0; this->media_size = 0; - this->media_name = ""; - this->media_url = ""; + this->bindata = 0; + this->bindata_len = 0; } std::string FMessage::getMessage_WA_Type_StrValue(unsigned char type) @@ -60,6 +59,8 @@ std::string FMessage::getMessage_WA_Type_StrValue(unsigned char type) FMessage::~FMessage() { + if (this->bindata != NULL) + free(this->bindata); } Key::Key(const std::string& remote_jid, bool from_me, const std::string& id) -- cgit v1.2.3