The branch, v3-3-test has been updated via 53e8f92678428a0c3cbeefa83219609661d28831 (commit) from 56af6112d67aa9dd3757297fbe29ce1a3eabf00d (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test - Log ----------------------------------------------------------------- commit 53e8f92678428a0c3cbeefa83219609661d28831 Author: Stefan Metzmacher <me...@samba.org> Date: Mon Jan 19 16:37:53 2009 -0800 socket_wrapper: fix PCAP support broken by aaea68791cfea45c6fa69abc93ad6d0e832d0283 We should not close the fd after writing the first packet. metze ----------------------------------------------------------------------- Summary of changes: source/lib/socket_wrapper/socket_wrapper.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/source/lib/socket_wrapper/socket_wrapper.c b/source/lib/socket_wrapper/socket_wrapper.c index cee43c0..7b73061 100644 --- a/source/lib/socket_wrapper/socket_wrapper.c +++ b/source/lib/socket_wrapper/socket_wrapper.c @@ -901,7 +901,7 @@ static int swrap_get_pcap_fd(const char *fname) if (write(fd, &file_hdr, sizeof(file_hdr)) != sizeof(file_hdr)) { close(fd); - return -1; + fd = -1; } return fd; } @@ -1194,11 +1194,9 @@ static void swrap_dump_packet(struct socket_info *si, fd = swrap_get_pcap_fd(file_name); if (fd != -1) { if (write(fd, packet, packet_len) != packet_len) { - close(fd); free(packet); return; } - close(fd); } free(packet); -- Samba Shared Repository