]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
SFTP: more logging to track down OpenOffice hang.
authordavid-sarah <david-sarah@jacaranda.org>
Sun, 30 May 2010 04:08:09 +0000 (21:08 -0700)
committerdavid-sarah <david-sarah@jacaranda.org>
Sun, 30 May 2010 04:08:09 +0000 (21:08 -0700)
src/allmydata/frontends/sftpd.py

index 0d459f6e6dda0f2319c48b30d74ba07a2a5f7e0d..368f91cc4926de22c538172ef1e76bd5bbfe73f0 100644 (file)
@@ -1085,10 +1085,15 @@ class SFTPUserHandler(ConchUser, PrefixingLogMixin):
         if userpath in self._heisenfiles:
             files += self._heisenfiles[userpath]
 
+        if noisy: self.log("files = %r in %r" % (files, request), level=NOISY)
+
         d = defer.succeed(None)
         for f in files:
             if f is not ignore:
-                d.addBoth(lambda ign: f.sync())
+                def _sync(ign):
+                    if noisy: self.log("_sync %r in %r" % (f, request), level=NOISY)
+                    f.sync()
+                d.addBoth(_sync)
 
         def _done(ign):
             self.log("done %r" % (request,), level=OPERATIONAL)
@@ -1097,7 +1102,7 @@ class SFTPUserHandler(ConchUser, PrefixingLogMixin):
         return d
 
     def _remove_heisenfile(self, userpath, parent, childname, file_to_remove):
-        if noisy: self.log("._remove_file(%r, %r, %r, %r)" % (userpath, parent, childname, file_to_remove), level=NOISY)
+        if noisy: self.log("._remove_heisenfile(%r, %r, %r, %r)" % (userpath, parent, childname, file_to_remove), level=NOISY)
 
         direntry = self._direntry_for(parent, childname)
         if direntry in all_heisenfiles: