#1043 #1042 #812. Thank You to Thomas for this "polishing" patch. Thank you to everybody who has worked on this issue. Adding all the comments on the three issues together comes to about 60 items by at least 6 contributors. And it involves platform issues, networking, Linux and Windows APIs. One of the most complex issues to arise in Exiv2. Well done everybody. And we've dealt with this quickly. Only 9 days since Calvin first reported #1042.

I use the term "complex" to mean many threads of technology.  "complex" != "complicated".  "complicated" = "difficult to understand".  We try to avoid "complicated".
v0.27.3
Robin Mills 10 years ago
parent fe48230c64
commit e51425046e

@ -694,7 +694,7 @@ namespace Exiv2 {
*/ */
virtual byte* mmap(bool /*isWriteable*/ =false); virtual byte* mmap(bool /*isWriteable*/ =false);
virtual int munmap(); virtual int munmap();
virtual int msync(); int msync();
//@} //@}
//! @name Accessors //! @name Accessors

@ -1199,7 +1199,8 @@ namespace Exiv2 {
MemIo *memIo = dynamic_cast<MemIo*>(&src); MemIo *memIo = dynamic_cast<MemIo*>(&src);
if (memIo) { if (memIo) {
// Optimization if src is another instance of MemIo // Optimization if src is another instance of MemIo
if (true == p_->isMalloced_) { if (p_->isMalloced_) {
msync();
std::free(p_->data_); std::free(p_->data_);
} }
p_->idx_ = 0; p_->idx_ = 0;
@ -1287,8 +1288,7 @@ namespace Exiv2 {
int MemIo::munmap() int MemIo::munmap()
{ {
msync(); return msync();
return 0;
} }
int MemIo::msync() int MemIo::msync()

Loading…
Cancel
Save