Wireshark-dev: [Wireshark-dev] Fwd: [Wireshark-commits] rev 42961: /trunk/ /trunk/: file.c /tru

From: Anders Broman <a.broman@xxxxxxxxxxxx>
Date: Fri, 01 Jun 2012 20:47:08 +0200
(resend, seems lost)
This broke wiretap plugins
>Remove the file_ routines from the .def file for Wiretap - they should
> only be called by code inside Wiretap.
Regards
Anders

-------- Ursprungligt meddelande --------
Ämne: [Wireshark-commits] rev 42961: /trunk/ /trunk/: file.c /trunk/wiretap/: file_access.c file_wrappers.c file_wrappers.h wtap.c wtap.def wtap.h
Datum: Fri, 01 Jun 2012 08:05:13 GMT
Från: guy@xxxxxxxxxxxxx
Svar till: wireshark-dev@xxxxxxxxxxxxx
Till: wireshark-commits@xxxxxxxxxxxxx


http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=42961

User: guy
Date: 2012/06/01 01:05 AM

Log:
 Sigh.  There appears to be no way to get Windows to allow us to rename a
 file that we ourselves have open.  In the "safe save" code path for
 capture files, on Windows temporarily close the file descriptors for the
 currently-open capture before doing the rename and then, if the rename
 failed, reopen them, leaving the rest of the wtap and capture_file
 structures intact.
 
 Rename filed_open() to file_fdopen(), to make its name match what it
 does a bit better (it's an fdopen()-style routine, i.e. do the
 equivalent of an open with an already-open file descriptor rather than a
 pathname, in the file_wrappers.c set of routines).
 
 Remove the file_ routines from the .def file for Wiretap - they should
 only be called by code inside Wiretap.
 
 Closing a descriptor open for input has no reason to fail (closing a
 descriptor open for *writing* could fail if the file is on a server and
 dirty pages are pushed asynchronously to the server and synchronously on
 a close), so just have file_close() return void.

Directory: /trunk/
  Changes    Path          Action
  +18 -9     file.c        Modified

Directory: /trunk/wiretap/
  Changes    Path               Action
  +1 -1      file_access.c      Modified
  +28 -4     file_wrappers.c    Modified
  +4 -2      file_wrappers.h    Modified
  +129 -0    wtap.c             Modified
  +2 -14     wtap.def           Modified
  +7 -0      wtap.h             Modified

___________________________________________________________________________
Sent via:    Wireshark-commits mailing list <wireshark-commits@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-commits
Unsubscribe: https://wireshark.org/mailman/options/wireshark-commits
             mailto:wireshark-commits-request@xxxxxxxxxxxxx?subject=unsubscribe