aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/export_object_dlg.c
AgeCommit message (Collapse)AuthorFilesLines
2017-12-08Have the frame_tvbuff.c routines not use the global cfile.Guy Harris1-0/+2
Have the routines that create them take a pointer to a struct packet_provider_data, store that in the tvbuff data, and use it to get the wtap from which packets are being read. While we're at it, don't include globals.h in any header files, and include it in source files iff the source file actually uses cfile. Add whatever includes that requires. Change-Id: I9f1ee391f951dc427ff62c80f67aa4877a37c229 Reviewed-on: https://code.wireshark.org/review/24733 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-23Improve http object export for URLs with long extensionsEldon Stegall1-1/+1
This allows the export of objects with extensions that may be longer than the allowed file name of an export (due to underlying filesystem, etc). The extension detection mechanism previously preserved everything in the file name after the final ".", but in some cases (especially with long query strings) this would exceed the allowed maximum file length, and simply refuse to export the object. Now, if the length of the extension and duplicate number is longer than the allowable file length, the extension is ignored, and the entire string is truncated to allow an acceptable export filename. Bug: 14130 Change-Id: I6fa0281519d031c07a9ac621002ac328f34f54cc Reviewed-on: https://code.wireshark.org/review/23960 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-12-02Enable exporting objects with tsharkMoshe Kaplan1-66/+49
A new "--export-object <protocol>,<destdir>" option is added to tshark. This required refactoring Export Object behavior in all GUIs to give the export object handling to the dissector, rather than the ui layer. Included in the refactoring was fixing some serious memory leaks in Qt Export Object dialog, crash due to memory scope issues in GTK Export Object dialog, and addition sorting column feature in Qt dialog (set up by creating a widget to manage the items that were previously leaking memory) Bug: 9319 Ping-Bug: 13174 Change-Id: I515d7662fa1f150f672b1476716f347ec27deb9b Reviewed-on: https://code.wireshark.org/review/18927 Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-06-19Revert "tap: change glib functions to wmem."Pascal Quantin1-3/+3
This reverts commit 2e9f3c5d366eaa7139fc877b5301392166b3f985. It breaks the registration of codec, dissector and libwiretap plugins. Change-Id: I4ef91dd192f765adf87ea9fe9f3693e25dbd24de Reviewed-on: https://code.wireshark.org/review/16012 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-17tap: change glib functions to wmem.Dario Lombardo1-3/+3
Change-Id: I878ae6b121a669f9b7f4e1e57bc079f0cb44c0bf Reviewed-on: https://code.wireshark.org/review/15270 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-14dcm: remove g_mallocDario Lombardo1-2/+2
Change-Id: I3d00b710c6fc6e5798ecc5eca9af11ccac920e5a Reviewed-on: https://code.wireshark.org/review/14913 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-05-05GTK UI: remove eo_saveable_pathname in favor of eo_massage_strDavid Creswick1-29/+6
The function had several deficiencies: - When "" is passed as the filename, the function returns a null pointer (due to the quirky behavior of g_strsplit_set), which causes a segfault when it's dereferenced later. I'm not sure what the correct return should be, but it shouldn't be NULL. - It leaks memory. (The array of strings returned by g_strsplit_set are never freed.) - It only strips out backslashes. That is not the only character that is disallowed in filenames, even on windows. - The functionality is already provided by eo_massage_str and it does a more complete job of it. Change-Id: I4d9eab7506048c5d04de8f163b8af1e3f67c163d Reviewed-on: https://code.wireshark.org/review/7996 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-15ui/gtk/*.c: Add editor modelines; As needed: Fix indentationBill Meier1-1/+14
Change-Id: I8cd9d9fe5f12c284f46b8f725766f681faccd753 Reviewed-on: https://code.wireshark.org/review/7138 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-01Remove unneeded includes from ui folderMartin Mathieson1-1/+0
Change-Id: Ifd1eebff9080cd3867e44e4dcb2d2681370ed60a Reviewed-on: https://code.wireshark.org/review/6128 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-06-05Add Object (file) export for files transferred over TFTP.Martin Mathieson1-0/+7
Updated following review comments. Change-Id: I56e70d8f8e332d2aea604ceec16c980ad890fa58 Reviewed-on: https://code.wireshark.org/review/1885 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.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-05-15Use file_selection_run() for dialogs created with file_selection_new().Guy Harris1-15/+42
svn path=/trunk/; revision=49320
2013-05-15gtk_file_chooser_dialog_new() makes the file chooser dialog a transientGuy Harris1-6/+0
window for the specified parent; we don't have to do that ourselves. svn path=/trunk/; revision=49309
2013-05-14Give file_selection_new() an argument to specify the parent window ofGuy Harris1-0/+2
the file selection dialog. Call gtk_file_chooser_set_do_overwrite_confirmation() in file_selection_new() for FILE_SELECTION_SAVE file selection dialogs, rather than doing it in the individual callers of file_selection_new(). Use gtk_dialog_set_alternative_button_order() in file_selection_new() to set the alternative button order, rather than using #ifdefs. Use file_selection_new() and file_selection_run() in the graph analysis code. (We should clean up other code that uses file_selection_new() to use file_selection_run(), and clean up other code that uses gtk_file_chooser_dialog_new() to use file_selection_new() and file_selection_run().) svn path=/trunk/; revision=49308
2013-03-21From beroset:Bill Meier1-1/+1
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10404 Note: The following parts of the patch had been previously done: asn1/snmp/packet-snmp-template.c epan/dissectors/packet-snmp.c epan/dissectors/packet-x11.c Also; hostlist_table.c: code under '#ifdef HAVE_GEOIP' didn't compile and needed a few additional patches. svn path=/trunk/; revision=48447
2013-03-09Use explicit casts.Anders Broman1-17/+17
svn path=/trunk/; revision=48212
2013-03-09From Jose Pico via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8377 ↵Alexis La Goutte1-4/+32
NEW FEATURE IMPLEMENTED: SMB2 SUPPORT FOR EXPORT->OBJECTS->SMB Added functionality: - SMB2 support for Export->Objects->SMB - support for SMB_COM_CREATE, SMB_COM_OPEN, SMB_COM_READ and SMB_COM_WRITE commands - Ability to choose between File Id and full file name as identifier for file re-building. Implemented as an option under Edit->Preferences->Protocols->SMB and Edit->Preferences->Protocols->SMB2. Other minor changes and fixes: - Full filename in file - Inclusion of IP of SMB server when treeid name (i.e. hostname) is not known - UTF-8 filenames encoding before passing them to Export Object Window - Re-written insert_chunk function of export_object_smb.c to make it easier to debug - Fixed of an error in insert_chunk function of export_object_smb.c (the verification of next free_chunk was always skipped after deleting one free_chunk). - Removed duplicated code by inserting the function feed_eo_smb in packet-smb.c and packet-smb2.c - Changed the label of Export->Objects->SMB menu into Export->Objects->SMB/SMB2 svn path=/trunk/; revision=48210
2012-12-22Remove unneeded initializations, and one redundant if condition.Evan Huus1-1/+1
svn path=/trunk/; revision=46702
2012-10-18Move ui-independent object export routines to the common ui directory.Gerald Combs1-0/+462
Implement DICOM, HTTP, and SMB object exports. Rename the GTK+ export files. C++-ize epan/tap.h. Fix an apparent memory leak in eo_save_all_clicked_cb. The Qt dialog has an indeterminate progress bar. I tried adding something similar to the GTK+ dialog but event processing led down a rabbit hole. svn path=/trunk/; revision=45647