Wireshark-bugs: [Wireshark-bugs] [Bug 1678] "Follow TCP Stream" adds extra 0A char when saving a
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1678
Stephen Fisher <stephentfisher@xxxxxxxxx> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|Major |Normal
OS/Version|Linux |All
Platform|PC |All
Version|0.99.4 |SVN
--- Comment #6 from Stephen Fisher <stephentfisher@xxxxxxxxx> 2008-03-18 06:00:43 GMT ---
Thanks for your reports. This is actually happening by design, although that
design is not optimal. If you want an exact representation of what is on the
screen saved in a file, saving as raw is the right solution (not just a
workaround). Saving as ASCII will add line feeds at some point in an effort to
manually wrap the text. It looks like we are wrapping at the wrong points
though.
More detail: The function print_line_text from print.c is used by
follow_save_as_ok_cb() in gtk/follow_stream.c when "printing" to a file. This
function puts a new line after every "line" it comes across. That code intends
to just skip to the next line when writing out each line of text. In this
case, however, lines of text from the Follow TCP Stream can span many lines -
sometimes an entire packet - before the new line is inserted. This should
probably be looked at closer to see what the desired behavior is. The desired
behavior may be what the comment above follow_read_tcp_stream() in
gtk/follow_tcp.c states, which is to accumulate actual lines of text before
passing them over to print_line(). Fixing this may take quite a bit of effort
to redesign the code.
--
Configure bugmail: http://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.