[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:44:55 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=6b20a63

The following commit has been merged in the master branch:
commit 6b20a636b711ca58de5fc6868ee67f19250bdb85
Author: Robin Mills <robin at clanmills.com>
Date:   Tue Mar 24 00:27:59 2015 +0000

    #1043 and #1042.  Thanks to Thomas for showing that r3627 reintroduced #812.  Thanks to Thoralf for suggesting msync MemIo fix.
---
 include/exiv2/basicio.hpp |  1 +
 src/basicio.cpp           | 14 +++++++++++---
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/include/exiv2/basicio.hpp b/include/exiv2/basicio.hpp
index 23d28d1..8000d4f 100644
--- a/include/exiv2/basicio.hpp
+++ b/include/exiv2/basicio.hpp
@@ -694,6 +694,7 @@ namespace Exiv2 {
          */
         virtual byte* mmap(bool /*isWriteable*/ =false);
         virtual int munmap();
+        virtual int msync();
         //@}
 
         //! @name Accessors
diff --git a/src/basicio.cpp b/src/basicio.cpp
index d6c7102..c1391b2 100644
--- a/src/basicio.cpp
+++ b/src/basicio.cpp
@@ -582,9 +582,6 @@ namespace Exiv2 {
         // If file is > 1MB and doesn't have hard links then use a file, otherwise
         // use a memory buffer. I.e., files with hard links always use a memory
         // buffer, which is a workaround to ensure that the links don't get broken.
-
-        // #1042 and #1043.  Always use a FileIo object to avoid Samba/Ubuntu/cifs error
-        ret = 911;
         if (ret != 0 || (buf.st_size > 1048576 && nlink == 1)) {
             pid_t pid = ::getpid();
             std::auto_ptr<FileIo> fileIo;
@@ -1177,6 +1174,7 @@ namespace Exiv2 {
     MemIo::~MemIo()
     {
         if (p_->isMalloced_) {
+            msync();
             std::free(p_->data_);
         }
         delete p_;
@@ -1289,9 +1287,19 @@ namespace Exiv2 {
 
     int MemIo::munmap()
     {
+    	msync();
         return 0;
     }
 
+    int MemIo::msync()
+    {
+#ifdef MS_SYNC
+    	return ::msync(p_, p_->size_, MS_SYNC);
+#else
+		return 0;
+#endif
+    }
+
     long MemIo::tell() const
     {
         return p_->idx_;

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list