Browse Source

Fixed white-space issues again which got clobbered in merge, same as rev. 7c07e68b6f56 (and more).

pull/1/head Release_2.1.0-RC29
Jorg Knobloch 5 years ago
parent
commit
571e249c32
  1. 27
      message_cache.cc

27
message_cache.cc

@ -247,13 +247,13 @@ namespace pEp {
dst->_sender_fpr = dup(src->_sender_fpr); dst->_sender_fpr = dup(src->_sender_fpr);
if (_id == "") { if (_id == "") {
dst->opt_fields = dup(src->opt_fields); dst->opt_fields = dup(src->opt_fields);
} }
else { else {
dst->opt_fields = ::new_stringpair_list(::new_stringpair("X-pEp-Adapter-Cache-ID", _id.c_str())); dst->opt_fields = ::new_stringpair_list(::new_stringpair("X-pEp-Adapter-Cache-ID", _id.c_str()));
if (!dst->opt_fields) if (!dst->opt_fields)
throw std::bad_alloc(); throw std::bad_alloc();
dst->opt_fields->next = dup(src->opt_fields); dst->opt_fields->next = dup(src->opt_fields);
} }
return dst; return dst;
@ -483,12 +483,14 @@ namespace pEp {
::message *_msg; ::message *_msg;
std::string _id = cacheID(src); std::string _id = cacheID(src);
{ {
std::lock_guard<std::mutex> l(_mtx); _msg = std::lock_guard<std::mutex> l(_mtx);
message_cache._cache.at(_id).src; swapContent(src, _msg); _msg = message_cache._cache.at(_id).src;
swapContent(src, _msg);
} }
::message *_dst = nullptr; PEP_STATUS status = ::message *_dst = nullptr;
::encrypt_message(session, src, extra, &_dst, enc_format, flags); PEP_STATUS status = ::encrypt_message(session, src, extra, &_dst,
enc_format, flags);
*dst = empty_message_copy(_dst, _id); *dst = empty_message_copy(_dst, _id);
{ {
@ -514,14 +516,15 @@ namespace pEp {
::message *_msg; ::message *_msg;
std::string _id = cacheID(src); std::string _id = cacheID(src);
{ {
std::lock_guard<std::mutex> l(_mtx); _msg = std::lock_guard<std::mutex> l(_mtx);
message_cache._cache.at(_id).src; swapContent(src, _msg = message_cache._cache.at(_id).src;
_msg); swapContent(src, _msg);
} }
::message *_dst = nullptr; PEP_STATUS status = ::message *_dst = nullptr;
::encrypt_message_for_self(session, target_id, src, extra, &_dst, PEP_STATUS status = ::encrypt_message_for_self(session, target_id, src,
enc_format, flags); *dst = empty_message_copy(_dst, _id); extra, &_dst, enc_format, flags);
*dst = empty_message_copy(_dst, _id);
{ {
std::lock_guard<std::mutex> l(_mtx); std::lock_guard<std::mutex> l(_mtx);

Loading…
Cancel
Save