aboutsummaryrefslogtreecommitdiffstats
path: root/fileset.c
AgeCommit message (Collapse)AuthorFilesLines
2016-02-04Fix memleaks related to get_dirnamePeter Wu1-2/+2
get_dirname may return NULL instead of the original string, so avoid patterns like get_dirname(strdup(x)). Writing to cf_path.toUtf8().data() is fine btw, toUtf8() returns new memory. This fixes two memleak reported by LeakSanitizer via fileset_add_dir and MainWindow::captureFileReadFinished (both via cf_callback_invoke). Change-Id: I0f1528763e77e1f55b54b6674c890a9d02302ee8 Reviewed-on: https://code.wireshark.org/review/13691 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-08Fix a lot of typos and misspellingsmoshekaplan1-2/+2
Change-Id: I8512cfa1d424f82a873a0e0e1d22c7b075fdd7f3 Reviewed-on: https://code.wireshark.org/review/13069 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-07Clean up includes of unistd.h, fcntl.h, and sys/stat.h.Guy Harris1-12/+0
Have wsutil/file_util.h include them on UN*X, just as it includes io.h on Windows, so we can have a rule of "if you do file operations, include <wsutil/file_util.h> and use the routines in it". Remove includes of unistd.h, fcntl.h, and sys/stat.h that aren't necessary (whether because of the addition of them to wsutil/file_util.h or because they weren't needed in the first place). Change-Id: Ie241dd74deff284e39a5f690a297dbb6e1dc485f Reviewed-on: https://code.wireshark.org/review/11619 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-14We use GLib's directory-reading routines, so we don't need <dire[cn]t.h>.Guy Harris1-4/+0
Change-Id: Id86e5d6d0ab24adb1bfff0688f33a40f2fdaed8d Reviewed-on: https://code.wireshark.org/review/7108 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-17Don't use ctype.h routines.Guy Harris1-2/+1
That avoids locale dependency and handles possibly-signed chars(which we weren't always doing before). Change-Id: I89e50678abb8c3e535081c92ca25bc1bab672c68 Reviewed-on: https://code.wireshark.org/review/4798 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-12Add editor modelines; Adjust whitespace as needed.Bill Meier1-0/+13
Change-Id: I4da7b335d905dbca10bbce03aa88e1cdeeb1f8ad Reviewed-on: https://code.wireshark.org/review/4626 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-24Modify includes of config.h so that out-of-tree builds, i.e. CMakeGraham Bloice1-1/+1
don't pick up the in-tree copy. Change-Id: I7ec473876cdba1a025c52362d7f6adc62d24ce71 Reviewed-on: https://code.wireshark.org/review/3798 Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-11-17Move the epan/filesystem.c routines to wsutil; they're not specific toGuy Harris1-1/+1
packet dissection, they're specific to the entire Wireshark suite of programs. svn path=/trunk/; revision=53377
2012-10-22g_strcmp0 first occures in GLIB 2.16 define it localy if it does not existAnders Broman1-0/+1
to make builds on Fedora 8 with GTK 2.12 work. svn path=/trunk/; revision=45707
2012-10-01Implement file sets.Gerald Combs1-1/+1
Replace the original file set code with a UI form. Use more consistent file names. List the files using a QTreeWidget instead of a grid. fileset_is_file_in_set is only used in fileset.c so make it static. In main_window.cpp reduce our usage of the global cfile variable. svn path=/trunk/; revision=45243
2012-10-01Add a window pointer so that we can figure out from whence we came.Gerald Combs1-6/+4
Bring the timestamp output more in line with ISO 8601. svn path=/trunk/; revision=45240
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45015
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-06-24From Evan Huus:Anders Broman1-0/+44
Size wrong in "File Set List" for just-finished captures. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7370 svn path=/trunk/; revision=43455
2011-04-10Define ws_statb64 to be the appropriate "struct XXX" for aGuy Harris1-1/+1
64-bit-file-size-capable stat call, and use it for ws_fstat64(). svn path=/trunk/; revision=36545
2011-04-10Add ws_fstat64(), defined to be fstat on UN*X and _fstati64 on Windows.Guy Harris1-1/+1
Use it in some places where we're getting the file size. svn path=/trunk/; revision=36544
2010-10-12Define some vars & fcns as static;Bill Meier1-5/+5
Also: do some minor reformmating and cleanup of whitespace. svn path=/trunk/; revision=34492
2010-08-20When freeing the fileset entries, free the entry itself too.Jeff Morriss1-0/+1
svn path=/trunk/; revision=33865
2010-03-02Squelch some compiler warnings.Guy Harris1-11/+11
svn path=/trunk/; revision=32078
2009-11-10Removed some unused assignments.Stig Bjørlykke1-2/+1
svn path=/trunk/; revision=30920
2009-08-26(FWIW) One step towards including stdio.h & stdlib.h only when req'd.Bill Meier1-0/+1
svn path=/trunk/; revision=29568
2009-04-16Fix the last(?) of the Win64 compilation problems.Gerald Combs1-3/+3
svn path=/trunk/; revision=28065
2008-10-27ETH -> WS updates.Gerald Combs1-2/+2
svn path=/trunk/; revision=26570
2008-05-22Move the file utility functions from wiretap to libwsutil so thatJeff Morriss1-10/+10
libwireshark (and the plugins using those functions) do not depend on wiretap on Windows. While doing that, rename the eth_* functions to ws_*. svn path=/trunk/; revision=25354
2007-07-14Fix yet more casts of ctype.h macro arguments - and fix some cases whereGuy Harris1-1/+1
we were passing an uncasted "char" to those macros. svn path=/trunk/; revision=22306
2006-11-30suffix in file set is optionalTomas Kukosa1-2/+5
svn path=/trunk/; revision=20023
2006-08-29fix a minor bug: don't show a single file twice in the fileset dialogUlf Lamping1-3/+1
svn path=/trunk/; revision=19078
2006-05-21name changeRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18197
2005-11-07Use eth_dir_open(), not g_dir_open(); g_dir_open() isn't available inGuy Harris1-2/+2
GLib 1.2[.x]. svn path=/trunk/; revision=16412
2005-11-06replace *a lot* of file related calls by their GLib counterparts. This is ↵Ulf Lamping1-33/+9
necessary for the switch to GTK 2.6 (at least on WIN32). to do this, I've added file_util.h to wiretap (would file_compat.h be a better name?), and provide compat_macros like eth_open() instead of open(). While at it, move other file related things there, like #include <io.h>, definition of O_BINARY and alike, so it's all in one place. deleted related things from config.h.win32 As of these massive changes, I'm almost certain that this will break the Unix build. I'll keep an eye on the buildbot so hopefully everything is working again soon. svn path=/trunk/; revision=16403
2005-08-18while sorting the entries, don't use the file creation date but the filename ↵Ulf Lamping1-4/+4
for comparison svn path=/trunk/; revision=15411
2005-08-14Some 'no previous declararion' warning fixesJörg Mayer1-4/+4
svn path=/trunk/; revision=15355
2005-05-18do some code cleanup (from the previous commit) and close the directories ↵Ulf Lamping1-23/+36
opened with opendir/g_dir_open svn path=/trunk/; revision=14394
2005-05-18don't crash, if the given filename doesn't contain a dot e.g. 'test123'Ulf Lamping1-1/+1
svn path=/trunk/; revision=14390
2005-04-30(hopefully) removed various gcc warningsUlf Lamping1-0/+4
svn path=/trunk/; revision=14241
2005-04-30fix buildbot reported problems (unix related), part 4, more GLib 1.x relatedUlf Lamping1-2/+4
svn path=/trunk/; revision=14240
2005-04-30fix buildbot reported problems (unix related), part 3, don't use GError with ↵Ulf Lamping1-4/+4
GLib 1.x svn path=/trunk/; revision=14239
2005-04-29fix buildbot reported problems (unix related), part 2, add some missing ↵Ulf Lamping1-0/+5
#includes svn path=/trunk/; revision=14235
2005-04-29fix buildbot reported problems (unix related), part 1Ulf Lamping1-4/+5
svn path=/trunk/; revision=14234
2005-04-29add a new feature: list the files of a "File Set" (set of files generated by ↵Ulf Lamping1-0/+389
capturing "Multiple Files"/ringbuffer) and jump from one file of it to the next/previous one svn path=/trunk/; revision=14231