diff options
author | Guy Harris <guy@alum.mit.edu> | 2013-11-12 22:06:00 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2013-11-12 22:06:00 +0000 |
commit | 409dd075c6dbd46a0073c87e1de2c47ec8ecccde (patch) | |
tree | 6ed6029d1e8de2f109a9dc93559009f6d2c13e2f /ui | |
parent | 72f3c258a04d6323699eb9ebca13e53d2cb5b22e (diff) | |
download | wireshark-409dd075c6dbd46a0073c87e1de2c47ec8ecccde.tar.gz |
Replace fvalue_ftype() with a fvalue_type_ftenum() routine that returns
the ftenum_t for the fvalue's ftype, rather than a pointer to the ftype
(which isn't all that useful except as a handle, unless you import the
internal header).
Have fvalue_to_string_repr() return NULL, rather than failing, if the
fvalue's ftype has no val_to_string_repr method.
This lets us not include the ftypes internal header in
ui/cli/tap-diameter-avp.c.
svn path=/trunk/; revision=53290
Diffstat (limited to 'ui')
-rw-r--r-- | ui/cli/tap-diameter-avp.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/ui/cli/tap-diameter-avp.c b/ui/cli/tap-diameter-avp.c index d237024f59..3641c9775f 100644 --- a/ui/cli/tap-diameter-avp.c +++ b/ui/cli/tap-diameter-avp.c @@ -43,7 +43,6 @@ #include <string.h> #include "epan/packet_info.h" -#include <epan/ftypes/ftypes-int.h> #include <epan/tap.h> #include <epan/epan_dissect.h> #include <epan/stat_cmd_args.h> @@ -103,19 +102,15 @@ diam_tree_to_csv(proto_node* node, gpointer data) fprintf(stderr,"traverse end: hfi not found. node='%p'\n",(void *)node); return FALSE; } - ftype=fi->value.ftype->ftype; + ftype=fvalue_type_ftenum(&fi->value); if (ftype!=FT_NONE&&ftype!=FT_PROTOCOL) { /* convert value to string */ - if(fi->value.ftype->val_to_string_repr) + val_tmp=fvalue_to_string_repr(&fi->value,FTREPR_DISPLAY,NULL); + if(val_tmp) { - val_tmp=fvalue_to_string_repr(&fi->value,FTREPR_DISPLAY,NULL); - if(val_tmp) - { - val_str=ep_strdup(val_tmp); - g_free(val_tmp); - } - } - if(!val_str) + val_str=ep_strdup(val_tmp); + g_free(val_tmp); + } else val_str=ep_strdup_printf("unsupported type: %s",ftype_name(ftype)); /*printf("traverse: name='%s', abbrev='%s',desc='%s', val='%s'\n",hfi->name,hfi->abbrev,ftype_name(hfi->type),val_str);*/ |