https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2880
Chris Maynard <christopher.maynard@xxxxxxxxx> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #5481| |review_for_checkin?
Flag| |
--- Comment #5 from Chris Maynard <christopher.maynard@xxxxxxxxx> 2010-11-16 22:04:07 PST ---
Created an attachment (id=5481)
--> (https://bugs.wireshark.org/bugzilla/attachment.cgi?id=5481)
Patch that allows -z io,stat,<interval> to work with regional decimal
separator, '.' or ','
With the attached patch, I was able to run "tshark -z
io,stat,<interval>,<filter>,<filter>" with either "English (United States)" or
"Dutch (Netherlands)" as my regional settings and have it work as expected in
either case. For example:
English (United States): <interval> set to 0.5
tshark.exe -z io,stat,0.5,ip.addr==24.97.150.194,ip.addr==173.194.33.104 -q -r
capture.cap
===================================================================
IO Statistics
Interval: 0.500 secs
Column #0: ip.addr==24.97.150.194
Column #1: ip.addr==173.194.33.104
| Column #0 | Column #1
Time |frames| bytes |frames| bytes
000.000-000.500 4 1215 0 0
000.500-001.000 16 7823 6 1606
===================================================================
Dutch (Netherlands): <interval> set to 0,5
tshark.exe -z io,stat,0,5,ip.addr==24.97.150.194,ip.addr==173.194.33.104 -q -r
capture.cap
===================================================================
IO Statistics
Interval: 0.500 secs
Column #0: ip.addr==24.97.150.194
Column #1: ip.addr==173.194.33.104
| Column #0 | Column #1
Time |frames| bytes |frames| bytes
000.000-000.500 4 1215 0 0
000.500-001.000 16 7823 6 1606
===================================================================
I also tested with <interval> = 200 for both English and Dutch, and they were
equally successful. This patch is a bit of a hack but it seems to work.
Essentially, the patch accounts for the fact that the ',' might be gobbled up
as part of the <interval> in some locales but not for others.
Maybe there's a better way to solve this using some combination of localeconv()
and/or setlocale() or some other TBD solution, so I'm not checking in the patch
yet in case there are any objections.
--
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.