wsd: autodetect message type

Change-Id: I0f3ab61867ea067f24050acb15660fa93fc7bbb5
Reviewed-on: https://gerrit.libreoffice.org/33437
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
This commit is contained in:
Ashod Nakashian
2017-01-21 23:50:08 -05:00
committed by Ashod Nakashian
parent 4030795584
commit acc029a411
4 changed files with 33 additions and 38 deletions

View File

@ -169,9 +169,8 @@ void TileCache::saveTileAndNotify(const TileDesc& tile, const char *data, const
// Send to first subscriber as-is (without cache marker).
auto payload = std::make_shared<Message>(response,
Message::Dir::Out,
Message::Type::Binary,
response.size() + 1 + size);
Message::Dir::Out,
response.size() + 1 + size);
payload->append("\n", 1);
payload->append(data, size);
@ -190,9 +189,8 @@ void TileCache::saveTileAndNotify(const TileDesc& tile, const char *data, const
// Create a new Payload.
payload.reset();
payload = std::make_shared<Message>(response,
Message::Dir::Out,
Message::Type::Binary,
response.size() + size);
Message::Dir::Out,
response.size() + size);
payload->append(data, size);
for (size_t i = 1; i < subscriberCount; ++i)