aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorMichal Labedzki <michal.labedzki@tieto.com>2015-01-08 11:16:27 +0100
committerMichal Labedzki <michal.labedzki@tieto.com>2015-01-08 13:45:11 +0000
commit0078211c84b1e0bb669f421cddc057e8b0cae178 (patch)
tree5bc18d9866ef7acd123cc5f6cc39b623a7e040c3 /epan
parentec8ca916f3ec670b66080dc2be323ff53b44a65c (diff)
Add quotation marks in Conversations/Endpoints when address is string
Change-Id: I39d49542cd563db1f6d3423b4e382a9a5e1c801b Reviewed-on: https://code.wireshark.org/review/6398 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/conversation_table.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/epan/conversation_table.c b/epan/conversation_table.c
index 269ef89988..cc77cd1745 100644
--- a/epan/conversation_table.c
+++ b/epan/conversation_table.c
@@ -414,6 +414,21 @@ const char *get_conversation_filter(conv_item_t *conv_item, conv_direction_e dir
src_addr = address_to_str(NULL, &conv_item->src_address);
dst_addr = address_to_str(NULL, &conv_item->dst_address);
+ if (conv_item->src_address.type == AT_STRINGZ) {
+ char *new_addr;
+
+ new_addr = wmem_strdup_printf(NULL, "\"%s\"", src_addr);
+ wmem_free(NULL, src_addr);
+ src_addr = new_addr;
+ }
+ if (conv_item->dst_address.type == AT_STRINGZ) {
+ char *new_addr;
+
+ new_addr = wmem_strdup_printf(NULL, "\"%s\"", dst_addr);
+ wmem_free(NULL, dst_addr);
+ dst_addr = new_addr;
+ }
+
switch(direction){
case CONV_DIR_A_TO_FROM_B:
/* A <-> B */
@@ -549,6 +564,13 @@ const char *get_hostlist_filter(hostlist_talker_t *host)
sport=ct_port_to_str(host->ptype, host->port);
src_addr = address_to_str(NULL, &host->myaddress);
+ if (host->myaddress.type == AT_STRINGZ) {
+ char *new_addr;
+
+ new_addr = wmem_strdup_printf(NULL, "\"%s\"", src_addr);
+ wmem_free(NULL, src_addr);
+ src_addr = new_addr;
+ }
str = g_strdup_printf("%s==%s%s%s%s%s",
hostlist_get_filter_name(host, CONV_FT_ANY_ADDRESS),