Commit Graph

20 Commits

Author SHA1 Message Date
Pascal Quantin e2203f5aed Qt: fix memory leaks in VoIP calls window
- Add free of h245_labels to voip_calls_remove_all_tap_listeners() so that memory is not leaked with Qt GUI
- Call voip_calls_reset_all_taps() from VoipCallsDialog destructor so as to free allocated memory

Change-Id: I46945b5d475d8c1267819021a4ed2782c531a0c6
Reviewed-on: https://code.wireshark.org/review/11268
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-10-26 11:06:51 +00:00
Guy Harris fb72cad4e8 Allocate h245_labels when we initialize the h245dg tap.
Otherwise, it might not exist at the time we try to use it.  (Yes,
reproducible if you download

	https://wiki.wireshark.org/SampleCaptures?action=AttachFile&do=get&target=h223-over-rtp.pcap.gz

load it into Wireshark and, at least in the Qt UI, select Telephony ->
VoIP Calls - crashes every time on my Mac running Yosemite.)

Change-Id: Iacf5b8ef7fb5749dabeb5fc33d3494b5fc073c03
Reviewed-on: https://code.wireshark.org/review/11277
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-26 09:44:09 +00:00
Gerald Combs 4f39c603c2 More ADDRESS macro to address function conversions.
Replace remaining calls to SET_ADDRESS, CMP_ADDRESS, ADDRESSES_EQUAL,
COPY_ADDRESS, and COPY_ADDRESS_SHALLOW with their lower-case
equivalents.

Replace all ADD_ADDRESS_TO_HASH calls with add_address_to_hash.

Change-Id: I4cff857d7a84085abe0bccd52d2605d2a468bf6f
Reviewed-on: https://code.wireshark.org/review/11229
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: Michael Mann <mmann78@netscape.net>
2015-10-24 01:44:24 +00:00
Gerald Combs d9e530bc17 Use address functions instead of ADDRESS macros in ui.
Replace CMP_ADDRESS, COPY_ADDRESS, et al with their lower-case
equivalents in the ui directory.

Change-Id: I10e95e66c8da5b880133452ebc484c53046e87ba
Reviewed-on: https://code.wireshark.org/review/11199
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-22 11:46:12 +00:00
Gerald Combs 3687d39304 Qt: Initial RTP playback.
Note the "initial". This is woefully incomplete.  See the "to do" lists
below and in the code.

This differs a bit from the GTK+ version in that you specify one or more
streams to be decoded.

Instead of showing waveforms in individual widgets, add them all to a
single QCustomPlot. This conserves screen real estate and lets us more
easily take advantage of the QCP API. It also looks better IMHO.

Change a bunch of checks for QtMultimediaWidgets to QtMultimedia. We
probably won't use the widgets until we make 5.0 our minimum Qt
version and plain old QtMultimedia lets us support Qt 4 more easily
(in theory at least).

Add resampling code from libspeex. I initially used this to resample
each packet to match the preferred rate of our output device, but this
resulted in poorer audio quality than expected. Leave it in and use to
create visual samples for QCP and to match rates any time the rate
changes. The latter is currently untested.

Add some debugging macros.

Note that both the RTP player and RTP analysis dialogs decode audio data
using different code.

Note that voip_calls_packet and voip_calls_init_tap appear to be dead
code.

To do:

- Add silence frames where needed.
- Implement the jitter buffer.
- Implement the playback timing controls.
- Tapping / scanning streams might be too slow.

Change-Id: I20dd3b66d3df53c9b1f3501262dc01458849f6b4
Bug: 9007
Reviewed-on: https://code.wireshark.org/review/10458
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-02 18:26:05 +00:00
Pascal Quantin 9defa0fc18 GTK/Qt: fix crash when closing SIP Flows dialog
Bug: 11500
Change-Id: Ifc3826c9743b0fab338cc85c9210231320feddf2
Reviewed-on: https://code.wireshark.org/review/10384
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-09-04 18:24:27 +00:00
Michal Pazdera c711a63e48 Avoid duplicate SIP and Q.931 calls in VoIP Calls list in case of Q.931
transported over SIP as described in RFC 3204, 3.2 QSIG Media Type.

Change-Id: Ida30a7b115e60fa64d30cfc1f4b7c11be724f8ee
Reviewed-on: https://code.wireshark.org/review/9479
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-26 07:32:34 +00:00
Pascal Quantin 1ec868eddd Fix a few issues reported by PVS-Studio
See http://www.viva64.com/en/b/0328/ for details

Change-Id: Ic9ddfd690b49401c96cb8a4a277c671f9824be31
Reviewed-on: https://code.wireshark.org/review/8775
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>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-05 21:15:37 +00:00
AndersBroman 6d1b6f4692 [VoIP] There has to be two separate routines for MEGACO and H248 as
tap_id_offset is used to access tapinfo. Fixes a crash rported in

Bug: 11132
Change-Id: I32ada3e0eb16d0e128ff67c5aec499890602eab0
Reviewed-on: https://code.wireshark.org/review/8449
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-13 11:31:31 +00:00
Bill Meier 9c866ff971 Replace tabs by spaces when editor modelines has "expandtab"
Change-Id: If7a6f2697be732ae4f94ed8b845fd293c32510f7
Also: tabs-stops should be 8
Reviewed-on: https://code.wireshark.org/review/7100
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-02-13 17:34:53 +00:00
Michael Mann 90a76e0d51 Convert val_to_str -> val_to_str_wmem.
This is mostly for GUI usage, but a few dissectors needed some "non-packet scope" conversions.

val_to_str officially now uses wmem_packet_scope()

Change-Id: Ic9413eeb3406d7a7683222b86709f3675d628d81
Reviewed-on: https://code.wireshark.org/review/6933
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-04 06:58:49 +00:00
Michael Mann b635997624 Convert val_to_str_ext -> val_to_str_ext_wmem for calls that don't have valid packet scope (GUI).
val_to_str_ext now officially uses wmem_packet_scope().

Removed const from val_to_str[_ext]_wmem return value since it's not really constant.

Created utility functions in qt_ui_utils.h to help with the new memory management for its GUI.

Change-Id: Idf2ce4a4ce78d628b2269ad23a3a48fbfc9c077c
Reviewed-on: https://code.wireshark.org/review/6926
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-03 13:03:32 +00:00
Guy Harris 63a3d043e3 Consistently use the "g_string_free returns a C string pointer" idiom.
g_string_free(str, FALSE) frees the GString container but not the
underlying g_malloc()ed string; instead, it returns a pointer to the
g_malloc()ed string.

Fix those places that didn't already get the string pointer from
g_string_free() to do so rather than manually extracting the string
themselves.

And fix one place that didn't even need to use a string - it was just
scanning a C string without even modifying it.

Change-Id: Ibbf4872bf5b9935b9907f539b6edb1013f3053a5
Reviewed-on: https://code.wireshark.org/review/6532
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-13 23:14:13 +00:00
Martin Mathieson 43f09e67b4 Remove unneeded includes from ui folder
Change-Id: Ifd1eebff9080cd3867e44e4dcb2d2681370ed60a
Reviewed-on: https://code.wireshark.org/review/6128
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2015-01-01 23:11:10 +00:00
Alexis La Goutte 9c7c72d5f2 VoIP Calls: Missing break in switch (CID 1155515)
Change-Id: Ie62cd2901c791490fe6685f560815e09b921d03b
Reviewed-on: https://code.wireshark.org/review/6001
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-25 21:11:22 +00:00
Gerald Combs 2bb8255e29 Consolidate RTP stream structs.
Consolidate the three different RTP stream structs in ui/rtp_stream.h,
ui/gtk/rtp_player.c, and ui/voip_calls.c into one. Make the member names
a bit more consistent. Document what each GList contains. Use nstime_t
for timestamps since that's what we get from the frame data. Use g_new0
to initialize our structs.

Change-Id: I2b3f8f2051394a6a98a5c7bc49c117f07161d031
Reviewed-on: https://code.wireshark.org/review/5843
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-12-20 16:49:05 +00:00
Gerald Combs 2ebaa59a3b Consolidate sequence analysis code.
Move scattered code for seq_analysis_info_t creation and destruction to
tap-sequence-analysis.[ch].

Change-Id: I87c14b1c83105a48d0ab149a3abba71e2a2fe21f
Reviewed-on: https://code.wireshark.org/review/5479
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-11-26 00:04:05 +00:00
Gerald Combs 06dc2a7537 voip_calls: Fix tap callbacks.
We don't need to call the VoIP tap reset and draw callbacks repeately.
Do so only once from the RTP tap. Packet callbacks should return a
gboolean.

Clean up some function names and make some static.

Change-Id: I5c934ce8ce7f279861e8cc73235bbfc27d7fe622
Reviewed-on: https://code.wireshark.org/review/5396
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-11-19 17:14:52 +00:00
Gerald Combs cfa0e5fd53 voip_calls: Regression fixes.
Fix struct initialization logic. Clear a GQueue instead of deleting it.
Don't crash if we have no sequence diagram items. Make sure we show all
flows and not just invites. Zero allocated memory in a couple of places.

Change-Id: Ia5bb3ba57cf625de4b554b354e098aa0361dff28
Reviewed-on: https://code.wireshark.org/review/5390
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-11-18 23:37:35 +00:00
Gerald Combs 1dec509a88 voip_calls: Move to ui.
Move voip_calls.[ch] to ui. Add callbacks to voip_calls_tapinfo_t.
Remove unused function definitions.

Change-Id: Ib12db7053d53afa81ef2a66dc0cfe681bc624dd2
Reviewed-on: https://code.wireshark.org/review/5379
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-11-18 00:48:34 +00:00