summaryrefslogtreecommitdiffstats
path: root/sharkd_session.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:15:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:15:52 +0000
commit864dec30a3971aa043dd47f99168c889a5107102 (patch)
treedd322ea42bd05d24614f2f22afc75bc49cbb0b34 /sharkd_session.c
parentAdding upstream version 4.2.5. (diff)
downloadwireshark-864dec30a3971aa043dd47f99168c889a5107102.tar.xz
wireshark-864dec30a3971aa043dd47f99168c889a5107102.zip
Adding upstream version 4.2.6.upstream/4.2.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--sharkd_session.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sharkd_session.c b/sharkd_session.c
index 9e84cbc1..3bc2f822 100644
--- a/sharkd_session.c
+++ b/sharkd_session.c
@@ -4190,22 +4190,25 @@ sharkd_followers_visit_layers_cb(const void *key _U_, void *value, void *user_da
const int proto_id = get_follow_proto_id(follower);
guint stream;
- guint sub_stream = (guint) SUBSTREAM_UNUSED;
+ guint sub_stream;
if (proto_is_frame_protocol(pi->layers, proto_get_protocol_filter_name(proto_id)))
{
const char *layer_proto = proto_get_protocol_short_name(find_protocol_by_id(proto_id));
char *follow_filter;
- follow_filter = get_follow_conv_func(follower)(edt, pi, (guint *) &stream, (guint *) &sub_stream);
+ follow_filter = get_follow_conv_func(follower)(edt, pi, &stream, &sub_stream);
sharkd_json_object_open(NULL);
sharkd_json_value_string("protocol", layer_proto);
sharkd_json_value_string("filter", follow_filter);
- sharkd_json_value_anyf("stream", "%d", stream);
- if (sub_stream != (guint) SUBSTREAM_UNUSED)
+ if (get_follow_stream_count_func(follower) != NULL)
{
- sharkd_json_value_anyf("sub_stream", "%d", sub_stream);
+ sharkd_json_value_anyf("stream", "%u", stream);
+ }
+ if (get_follow_sub_stream_id_func(follower) != NULL)
+ {
+ sharkd_json_value_anyf("sub_stream", "%u", sub_stream);
}
sharkd_json_object_close();