Commit Graph

3889 Commits

Author SHA1 Message Date
Pascal Quantin ea447aad1f Qt: fix selection of folder in UAT dialog
Using getOpenFileName() even with ShowDirsOnly option does not work.
Let's use the dedicated getExistingDirectory() method instead.

Bug: 11842
Change-Id: Ie22c4c479005467dbf64d9a90a8f3b82d355d495
Reviewed-on: https://code.wireshark.org/review/12384
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-03 04:51:21 +00:00
Evan Huus cda450ed59 Fix address hashing broken in g4f39c60
We actually have to *use* the return value of the method, which the macro did
for us.

Change-Id: I240ca7e526a18054fe39c6c4ded902998dc2fef0
Reviewed-on: https://code.wireshark.org/review/12389
Petri-Dish: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Jim Young <jim.young.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-12-03 02:00:18 +00:00
ruengeler de87db6170 sctp_chunk_stat_dlg: fix The 'u_data->assoc' variable is assigned values twice successively. found by PVS Studio (V519)
Change-Id: I01ac47693279b5681c40287f12a63ef767c9ad74
Reviewed-on: https://code.wireshark.org/review/12382
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: Anders Broman <a.broman58@gmail.com>
2015-12-02 18:41:20 +00:00
Stig Bjørlykke a488610dd6 ui: Guard update_local_interfaces with HAVE_LIBPCAP
Change-Id: I276193047e37cf581fd42ccc74ff9131ee4fa055
Reviewed-on: https://code.wireshark.org/review/12377
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-02 12:21:58 +00:00
Stig Bjørlykke 92a2661d94 ui: Update interfaces when when changing profile.
The interfaces preferences are different for each profile so ensure
we update the interface settings when changing profile.

This bug was introduced in version 1.8.0.

Change-Id: Icf22670875e01bab6204c300ddc7fb8aeb3dcecf
Reviewed-on: https://code.wireshark.org/review/12363
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-02 11:33:24 +00:00
Stig Bjørlykke 631172f2f4 Qt: Use uniform interface display name
Use common function to generate the interface display name, both
when scanning for interfaces (scan_local_interfaces()) and when
changing Comment in the Manage Interfaces dialog.

Change-Id: I3260208856563aaf387ce397d4ae61bddcc89b4f
Reviewed-on: https://code.wireshark.org/review/12362
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-02 09:57:35 +00:00
Roland Knall b932ee8f13 Qt Frames: Use ButtonBox instead of buttons
In these frames the Ok and Close buttons are implemented
 as standalone buttons. This leads to the scenario, that
 they break plattform-ui preferences on the one hand, as
 well as not being the same order throughout.

 This patch replaces all Ok/Close buttons with the Qt
 button box, which handles the plattform-ui internally, and
 additionally allways enforces the same order.

Change-Id: If62b90016b222322f60c0962da04c8277589a57f
Reviewed-on: https://code.wireshark.org/review/12335
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-12-01 23:33:57 +00:00
Pascal Quantin 46370b3aea Qt: write number of decoded bytes in the RTP player temporary buffer
For codecs using compression (so not G.711) the number of decoded bytes is different from payload len * sample bytes.
This result in a truncated audio buffer and inaudible audio.

Change-Id: I755c19df37820c1c56acc7bd7b67fcc104516474
Reviewed-on: https://code.wireshark.org/review/12336
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-12-01 21:24:42 +00:00
Pascal Quantin 7e18954a27 Qt: fix generation of silence samples
The current code generates a shrill noise at least on Windows.
Presumably memccpy does not behave as initially expected :)

Change-Id: Id23a35d1d41ef4044b6a96c093a8fa927828f8b3
Reviewed-on: https://code.wireshark.org/review/12337
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-01 21:19:25 +00:00
Alexis La Goutte dde90234c9 sctp_byte_graph_dlg: fix The 'u_data' variable is assigned to itself found by PVS Studio (V570)
Change-Id: I6cde7c8357ad6295706c64ce6d280a867bdb9aad
Reviewed-on: https://code.wireshark.org/review/12338
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-01 21:10:42 +00:00
Gerald Combs 79f7edba15 Qt: Don't expose ColorUtils::graph_colors_.
Make graph_colors_ private and accessible via getters. Blind attempt at
fixing bug 11833.

Bug: 11833
Change-Id: I03b7e90c686374d2d0f046f7e5fe87e43939dc82
Reviewed-on: https://code.wireshark.org/review/12318
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-01 05:17:59 +00:00
Alexis La Goutte 78d664ce7e main_window: fix no previous prototype for function 'plugin_if_mainwindow_gotoframe' [-Wmissing-prototypes]
Change-Id: I2ac9d2250e8553b4cbd4146f931b618424dffdf5
Reviewed-on: https://code.wireshark.org/review/12304
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-30 20:49:57 +00:00
Alexis La Goutte b3b30624f6 mcast_stream_dlg: fix no previous prototype for function 'mcaststream_dlg_update' [-Wmissing-prototypes]
Change-Id: I7088dfcc0c5873732d972435638f951d5b1921f0
Reviewed-on: https://code.wireshark.org/review/12305
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: Michael Mann <mmann78@netscape.net>
2015-11-30 14:25:27 +00:00
Stig Bjørlykke e75f74add6 Qt: Check capture filter only once when selecting interface(s)
Changed to only check capture filter once (for each active DLT) when
changing selected interface(s).  This optimizes filter checking and
avoids a "No interfaces selected" error when processing unselected
interfaces before selected.

Added a small optimization fetching device_name outside loop.

Bug: 11671
Change-Id: I01ed7a99a2a9ced9a86774a78bec2ba27b4bb97c
Reviewed-on: https://code.wireshark.org/review/12268
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-29 19:00:28 +00:00
Gerald Combs 1acb2816bd [Automatic update for 2015-11-29]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: Id342a0bfe0bea352813c19adae67fb41806eb7d3
Reviewed-on: https://code.wireshark.org/review/12284
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-29 16:13:52 +00:00
João Valverde 5e6d45ca98 Make address_to_display() use proper (non-)constness
Don't return allocated memory as a const pointer.

Fixes multiple [-Wcast-qual] warnings.

Change-Id: Ie9ceac27fa2a5eba41a5392ac983ff28c3939239
Reviewed-on: https://code.wireshark.org/review/12267
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-29 00:25:11 +00:00
Stig Bjørlykke 41d4dabc29 Qt: Validate capture filter before showing packet list.
When starting a capture do validate all settings before showing
the packet list.

Bug: 11667
Change-Id: Ia0457b9643ca76f8d51c0a254f587398dda888d9
Reviewed-on: https://code.wireshark.org/review/12259
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-28 19:13:20 +00:00
Peter Wu 05121be1b4 Qt: reload after applying parameters in UDP multicast dialog
Noticed this message in stderr, started investigating:

    QObject::connect: No such signal MulticastStatisticsDialog::updateFilter(QString&,bool) in ui/qt/multicast_statistics_dialog.cpp:247
    QObject::connect:  (sender name:   'TapParameterDialog')
    QObject::connect:  (receiver name: 'TapParameterDialog')

Verified that after this patch, the "Max Burst" changes from "4/100ms"
to "1/1ms" when modifying "Burst measurement interval (ms)" from 100 to
1 using rtp-norm-transfer.pcap from the SampleCaptures wiki.

Change-Id: I803ff9e5a542a5fd3507b086f29628fbf5602784
Reviewed-on: https://code.wireshark.org/review/12228
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: Anders Broman <a.broman58@gmail.com>
2015-11-28 07:54:27 +00:00
Pascal Quantin 75da6960e0 Qt: set focus to text box when opening search frame
Change-Id: Iac932365bc2fa7a5d5102a5f5455ea01daa86590
Reviewed-on: https://code.wireshark.org/review/12236
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-28 07:46:39 +00:00
Pascal Quantin df83e45084 Qt: fix "go to packet" broken by g56625dd
Keeping auto scroll is required to update the row displayed.
Instead catch the mouse event and stop auto scroll only during that time.

Change-Id: Ibc5b0a4115192fc3e01e63c82e67761e5aed9d3b
Reviewed-on: https://code.wireshark.org/review/12235
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-28 07:44:25 +00:00
João Valverde 7c8314a683 Fix ISO C forbids an empty translation unit [-Wpedantic] (airpcap)
Autotools only warning.

Change-Id: I30f33d2f8611d662dbc62326862707bf05ad3f60
Reviewed-on: https://code.wireshark.org/review/12150
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-11-27 22:22:06 +00:00
Peter Wu d7f1243670 Fix crash in UDP Multicast Streams dialog
Attempting to open the UDP Multicast Streams dialog in the GTK UI
triggers an instant crash (heap-buffer-overflow).

Déjà vu. This is the same problem that plagued the RTP Streams dialog.
This patch is based on the fix in v1.99.3rc0-33-g2c65b33
(mcaststream_dlg_update confused GList vs. mcaststream_tapinfo_t).

After fixing that, the dialog crashed shortly after setting parameters
(heap-use-after-free). That fix is based on v1.99.10rc0-292-gb02a0ee
(after a retap, the old items were still present in the list).

Just that change was not enough as clearing the list still triggered a
signal, possibly because of the "changed" signal (while the RTP player
uses a selection setter function). Apply the patch based on
v1.99.10rc0-270-g01bd832 (disable selection while clearing).

Change-Id: I152bac6f954d8d1c5c20d6c7d56a196c3e20c681
Reviewed-on: https://code.wireshark.org/review/12227
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-11-27 21:15:11 +00:00
Pascal Quantin 56625dd456 Qt: remove automatic horizontal scrolling when selecting a row
QTreeView automatically scrolls so as to show as much as possible the content of the selected column.
Let's get rid of that.
Rename PacketList::setAutoScroll() so that it does not overload QAbstractItemView::setAutoscroll()

Change-Id: I09fb54f9b31c3025efddce6a4e709baaf107702d
Reviewed-on: https://code.wireshark.org/review/12225
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-27 18:49:53 +00:00
Pascal Quantin 62b03da49a Fix display of bytes as EBCDIC
MSVC compiler does not support properly setting an enum being part of a bit field.
For example the following code:
pinfo->fd->flags.encoding = PACKET_CHAR_ENC_CHAR_EBCDIC;
changes pinfo->fd->flags.encoding from 0x0 to 0xfffffffe instead of 0x1
Let's put back an unsigned int definition (like it is in master-1.12 branch) and add explicit casts where required

Bug: 11787
Change-Id: Idae0140fb6c172f1b3dbf10baefc8cfb00128f4c
Reviewed-on: https://code.wireshark.org/review/12220
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-27 18:39:09 +00:00
Peter Wu 946222c676 Fix crash in Capture File Properties dialog
Fixes crash when a capture file is closed while the capture file
properties dialog is open.

Change-Id: Iba35be38e1f53d422ff8428a672703385d477660
Reviewed-on: https://code.wireshark.org/review/12224
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-11-27 16:34:16 +00:00
Peter Wu 58dc5b05b9 SMB sidsnooping: use sid as key and name as value
Fixes "cast from 'const char *' to 'char *' drops const qualifier
[-Wcast-qual]", but changes the internal representation of
sid_name_table.

Change-Id: Ia853c3cf3010ea0cd1e2c975a23dd97e15be0fd6
Reviewed-on: https://code.wireshark.org/review/12157
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-27 05:34:36 +00:00
Stig Bjørlykke f5b816d4c9 Qt: Check zero recent column width
Hidden columns may have been stored with zero width, so ensure
we always check for this when fetching.

Change-Id: I625c05adccaf2d81198fdeeccf7feeb9a9eb82c2
Reviewed-on: https://code.wireshark.org/review/12196
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-27 05:29:08 +00:00
Pascal Quantin d9f777c99a Qt: display RTP/IAX2 graph analysis arrival time as absolute instead of relative
It makes it easier to synchronize the graph and packet list

Change-Id: Ia0c6bc46227c1ff9267622ff52b5a5d966cd6e6a
Reviewed-on: https://code.wireshark.org/review/12195
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-27 05:16:32 +00:00
Pascal Quantin 2c6824df2d Qt: display RTP stream Y axis values as milliseconds
Bug: 11784
Change-Id: I505338d85788e0889999622ff392ca8fe5f46836
Reviewed-on: https://code.wireshark.org/review/12194
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-27 05:14:18 +00:00
Stig Bjørlykke 15086a808e Qt: Make About->Plugins scrollable
Bug: 11427
Change-Id: Iebc693bc2a035bad3bc2491af4b5a12c9e7d2fa5
Reviewed-on: https://code.wireshark.org/review/12201
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-27 05:12:39 +00:00
Dario Lombardo d4277c3520 qt: add initializers (CID 1311487)
Change-Id: I3152548aa3237dc76e898986120f662cbe56fa38
Reviewed-on: https://code.wireshark.org/review/12188
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-27 05:12:19 +00:00
Dario Lombardo dcb3882e8f qt: add initializers to extcap dialog (CID 1297113)
Change-Id: I3c0d116554a663a1a6449d805c9fe860d4c9911e
Reviewed-on: https://code.wireshark.org/review/12190
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-26 21:44:37 +00:00
Pascal Quantin c965fb0614 Qt: make Files Set dialog modeless
Otherwise you need to close the window each time you change the file
so as to browse its content...

Change-Id: Ibf8485695cec34bb950ad98cb671e77d4f663b63
Reviewed-on: https://code.wireshark.org/review/12187
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-26 18:43:36 +00:00
Pascal Quantin a1f2951424 Qt: clear new_visible_rows_ when closing a capture file
Bug: 11756
Change-Id: Iccc92963f81c3ded143953c8c1fad27cd57a7bc2
Reviewed-on: https://code.wireshark.org/review/12182
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-11-26 17:47:15 +00:00
Stig Bjørlykke 4980d505f2 Qt: Use correct column width when switching profile
QTreeView::setColumnHidden() saves column width on hide and restores
column width on show.  When switching from a profile with hidden
columns to a profile where this columns are shown we get a
sectionResized() signal with the saved width from the old profile,
initiated from columnsChanged() -> setColumnVisibility().
We must avoid setting this as a new column width because this is
recent values from a old column layout.

In other cases we use setColumnVisibility() we don’t need to set
a new column width either, because we store the column width ourself.

Don't store column width when hiding column (new_width == 0).
Restore column width when showing column because profiles may have
changed the packet_list layout.

Change-Id: I7e89c3477402ec6d621cd2015ee74b086f60d6cb
Reviewed-on: https://code.wireshark.org/review/12111
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-26 17:16:51 +00:00
Stig Bjørlykke ce9d2ee428 Qt: Redissect packets when changing profile
When changing profile the protocol/dissector preferences may change
so we need to redissect according to new settings.

We should probably have a preferences diff to check if a redissect
is needed, like it is in the preferences dialog.

Bug: 11757
Change-Id: I025bbc7297966986a697f2a6368d9a74e3c1ba72
Reviewed-on: https://code.wireshark.org/review/12156
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-26 07:45:16 +00:00
Dario Lombardo b314342c00 qt: move file close (CID 1159303)
Change-Id: Ib21327babc77324313a1b3e2dd6ba0987a8fb333
Reviewed-on: https://code.wireshark.org/review/12144
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-11-25 20:07:25 +00:00
Peter Wu dde848b3d9 Press Start instead of Manage Interfaces on Enter
In the Capture Interfaces dialog, the default dialog action was
non-existing. Fix Extcap while at it (searched for "YesRole").

Reported on #wireshark at Freenode.

Change-Id: I7920b806a855acc20dcd2081f6b0d58e993b4ac1
Reviewed-on: https://code.wireshark.org/review/12136
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
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: Peter Wu <peter@lekensteyn.nl>
2015-11-25 15:20:40 +00:00
Mikael Kanstrup 9107fb6039 Fix memory leaks related to hide_interface function
Valgrind report leaks like these:
6 bytes in 6 blocks are definitely lost in loss record 2,197 of 46,703
  at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  by 0xA5C1610: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
  by 0xA5D8B0E: g_strdup (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
  by 0x69A211: ManageInterfacesDialog::localAccepted() (manage_interfaces_dialog.cpp:454)
  by 0x69A500: ManageInterfacesDialog::on_buttonBox_accepted() (manage_interfaces_dialog.cpp:211)
  by 0x71DB32: ManageInterfacesDialog::qt_metacall(QMetaObject::Call, int, void**) (manage_interfaces_dialog.moc.cpp:245)
  by 0xBEBE36C: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.2.1)
  by 0xBEBE2A5: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.2.1)
  by 0xAF87E41: QAbstractButton::clicked(bool) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.2.1)
  by 0xAD11095: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.2.1)
  by 0xAD11BAD: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.2.1)
  by 0xAD11D23: QAbstractButton::mouseReleaseEvent(QMouseEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.2.1)

96 bytes in 4 blocks are definitely lost in loss record 42,458 of 52,779
  at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  by 0xA5C1610: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
  by 0xA5D722D: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
  by 0xA5B84F3: g_list_append (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
  by 0x731F9A: hide_interface (iface_lists.c:426)
  by 0x69A211: ManageInterfacesDialog::localAccepted() (manage_interfaces_dialog.cpp:454)
  by 0x69A4F0: ManageInterfacesDialog::on_buttonBox_accepted() (manage_interfaces_dialog.cpp:211)
  by 0x71DB22: ManageInterfacesDialog::qt_metacall(QMetaObject::Call, int, void**) (manage_interfaces_dialog.moc.cpp:245)
  by 0xBEBE36C: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.2.1)
  by 0xBEBE2A5: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.2.1)
  by 0xAF87E41: QAbstractButton::clicked(bool) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.2.1)
  by 0xAD11095: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.2.1)

These are caused by leaks inside hide_interface function and among
its users. Fixed by letting hide_interface function free its
resources properly and making sure the users follow the pattern.

Change-Id: I91527b83d36dc38b402d0f4a1db4b7db40fd83f9
Reviewed-on: https://code.wireshark.org/review/12113
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-11-25 12:03:33 +00:00
Stig Bjørlykke 9601a4f724 Qt: Save preferences when hide/show columns
To preserve the hide/show column settings between switching profiles
the settings have to be saved.

Change-Id: I6f72b2980be149676e1c1099a604c8c6d0d995bf
Reviewed-on: https://code.wireshark.org/review/12109
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-24 19:13:45 +00:00
Pascal Quantin 8c46a728fe VoIP: fix a null dereference when trying to retrieve the time of a T.38 tapped packet
Rather than trying to retrieve frame_data from the packet number row (while it could be filtered) let's use pinfo.

Bug: 11596
Change-Id: I53966bfdfbeb0c5918c3524f4b9748ea425fe8a5
Reviewed-on: https://code.wireshark.org/review/12103
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-24 17:09:35 +00:00
Pascal Quantin 0981a50a57 Qt: check that a file name was selected before trying to export follow content
Bug: 11763
Change-Id: Iab117fe9f572eccc3cf88a9f3ff86a22aa0e33c9
Reviewed-on: https://code.wireshark.org/review/12099
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-11-24 15:41:14 +00:00
Alexis La Goutte ac2008c46f Qt (Recent Files): Fix typo on variable name
Wrong variable (display field max) is updated when set max recent files

Change-Id: Ie995192ffbf56cbf6bd9cea5b029ab16ff547d2f
Ping-Bug:11748
Reviewed-on: https://code.wireshark.org/review/12046
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-24 02:04:02 +00:00
Stig Bjørlykke 9851bed7a4 Qt: Fix column resolve names
Reset columns when resolve names column menu item is toggled,
and save preferences to preserve the setting.

We should probably have functions to redraw only one column.

Change-Id: I52dce8d104ab9bedd11edc5d200ab85154243cb5
Reviewed-on: https://code.wireshark.org/review/12077
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-23 20:35:23 +00:00
Stig Bjørlykke 7324555c1f Qt: Fixed more column issues when changing profile.
When changing profile without a loaded capture file we have to rebuild
cap_file_->cinfo when a capture is loaded.

Bug: 11493
Change-Id: I9b561a360236056c104cfdb478b855fa550325e2
Reviewed-on: https://code.wireshark.org/review/12068
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-23 17:02:41 +00:00
Stig Bjørlykke 815b7fe728 Qt: Revert to more optimized code
Revert some changes in PacketListModel::headerData from c5fb4022
to preserve more optimized code.

Change-Id: If708999a6d446d70eca7414670dec0c618190fe0
Reviewed-on: https://code.wireshark.org/review/12058
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-11-23 08:26:01 +00:00
Stig Bjørlykke b9812a7432 Qt: Preserve selected file in welcome screen.
When closing a capture file the recent files list are updated to put
the most recent opened file on top.  Ensure we preserve the selection
of the closed file instead of having the file in the closed file's
previous position selected.

Change-Id: I14c9edde55b88abf7ca7f1828e269ad49203b1db
Reviewed-on: https://code.wireshark.org/review/12018
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-23 05:57:39 +00:00
Stig Bjørlykke 35e5523dd2 Qt: Improved profiles popup menu
* Don’t add a global profile if having a personal copy.
* Fetch profiles from _current_ profiles list.
* Separate personal and global profiles.
* Use bold and checked for the the current profile.

* Fixed selection of the current profile in the manage profiles dialog.
* Aligned GTK version with Qt version, removed the “New from Global” sub menu.

Change-Id: I2326b39f7d04411000b3c014e3775284392c48c7
Ping-Bug: 11704
Reviewed-on: https://code.wireshark.org/review/12034
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-23 05:45:34 +00:00
Stig Bjørlykke c5fb402222 Qt: Set tooltip for packet list header
Added get_column_tooltip() to use common code in GTK and Qt.

Change-Id: I2f6ce95e2e129752bbb958a28aec6f42aa81be3d
Reviewed-on: https://code.wireshark.org/review/12047
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-23 05:41:09 +00:00
João Valverde fad15654b1 Remove configure --enable-ipv6 option
It's an ancient obsolete option with a confusing name.

Change-Id: Ib10330cf859cdea18fed2077c6539e56350ef380
Reviewed-on: https://code.wireshark.org/review/11967
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-23 04:07:37 +00:00