summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-01-31 21:05:49 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-01-31 21:05:49 +0000
commit7b75f16452eb389c635f8b18600222cd05feadac (patch)
tree2387da3f843f1f0f7d7e1d16ef0669d599333ba1 /protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp
parent7bf14fa3e62829e48295a0f1a5fa5d80e565df3e (diff)
- bindata considered useless;
- fix for audio files processing git-svn-id: http://svn.miranda-ng.org/main/trunk@11968 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp')
-rw-r--r--protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp
index c08066426e..ffaeff52b9 100644
--- a/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp
+++ b/protocols/WhatsApp/src/WhatsAPI++/WAConnection.cpp
@@ -413,19 +413,11 @@ void WAConnection::parseMessage(ProtocolTreeNode *messageNode) throw (WAExceptio
}
}
else {
- if (media->data == NULL || media->data->empty())
- return;
-
const string &encoding = media->getAttributeValue("encoding");
if (encoding.empty() || encoding == "text")
fmessage.data = media->getDataAsString();
- else {
+ else
fmessage.data = media->getAttributeValue("caption");
- if (media->data->size() > 0) {
- fmessage.bindata = (unsigned char*)malloc(fmessage.bindata_len = media->data->size());
- memcpy(fmessage.bindata, media->data->data(), fmessage.bindata_len);
- }
- }
}
if (m_pEventHandler != NULL)