diff options
author | Jörg Mayer <jmayer@loplof.de> | 2006-02-14 14:53:03 +0000 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2006-02-14 14:53:03 +0000 |
commit | 461b6d35ee6f8547427206f23633529e61cc3e1f (patch) | |
tree | 88ef7fded54ebdc1aa1f217a31370423a2e688e1 /gtk/menu.c | |
parent | e10101b7741a7a3773bf0233baf0e2ae2f441c31 (diff) | |
download | wireshark-461b6d35ee6f8547427206f23633529e61cc3e1f.tar.gz wireshark-461b6d35ee6f8547427206f23633529e61cc3e1f.tar.bz2 wireshark-461b6d35ee6f8547427206f23633529e61cc3e1f.zip |
Paolo Abeni:
- enable the 'follow SSL stream' menu item only when a ssl packet is selected.
- when 'following' an ssl stream, show ssl decrypted data only for current conversation.
- fix a typo in ssl preference description.
svn path=/trunk/; revision=17301
Diffstat (limited to 'gtk/menu.c')
-rw-r--r-- | gtk/menu.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/gtk/menu.c b/gtk/menu.c index 58eaa39d97..60504fca17 100644 --- a/gtk/menu.c +++ b/gtk/menu.c @@ -1959,9 +1959,26 @@ walk_menu_tree_for_selected_packet(GList *node, frame_data *fd, return node_data->enabled; } +static int +packet_is_ssl(epan_dissect_t* edt) +{ + GPtrArray* array; + int ssl_id, is_ssl; + if (!edt || !edt->tree) + return 0; + ssl_id = proto_get_id_by_filter_name("ssl"); + if (ssl_id < 0) + return 0; + array = proto_find_finfo(edt->tree, ssl_id); + is_ssl = array->len > 0; + g_ptr_array_free(array, FALSE); + return is_ssl; +} + void set_menus_for_selected_packet(capture_file *cf) { + int is_ssl = packet_is_ssl(cf->edt); set_menu_sensitivity(main_menu_factory, "/Edit/Mark Packet (toggle)", cf->current_frame != NULL); set_menu_sensitivity(packet_list_menu_factory, "/Mark Packet (toggle)", @@ -1995,11 +2012,11 @@ set_menus_for_selected_packet(capture_file *cf) set_menu_sensitivity(tree_view_menu_factory, "/Follow TCP Stream", cf->current_frame != NULL ? (cf->edt->pi.ipproto == IP_PROTO_TCP) : FALSE); set_menu_sensitivity(main_menu_factory, "/Analyze/Follow SSL Stream", - cf->current_frame != NULL ? (cf->edt->pi.ipproto == IP_PROTO_TCP) : FALSE); + cf->current_frame != NULL ? is_ssl : FALSE); set_menu_sensitivity(packet_list_menu_factory, "/Follow SSL Stream", - cf->current_frame != NULL ? (cf->edt->pi.ipproto == IP_PROTO_TCP) : FALSE); + cf->current_frame != NULL ? is_ssl : FALSE); set_menu_sensitivity(tree_view_menu_factory, "/Follow SSL Stream", - cf->current_frame != NULL ? (cf->edt->pi.ipproto == IP_PROTO_TCP) : FALSE); + cf->current_frame != NULL ? is_ssl : FALSE); set_menu_sensitivity(main_menu_factory, "/Analyze/Decode As...", cf->current_frame != NULL && decode_as_ok()); set_menu_sensitivity(packet_list_menu_factory, "/Decode As...", |