]> git.ipfire.org Git - thirdparty/mtr.git/commit
cmdline: multiple host names dropped all but one host (issue #168) 169/head
authorMatt Kimball <matt.kimball@gmail.com>
Wed, 7 Dec 2016 15:43:08 +0000 (07:43 -0800)
committerMatt Kimball <matt.kimball@gmail.com>
Wed, 7 Dec 2016 15:53:47 +0000 (07:53 -0800)
commitc419873aceb7c416cea91724f3e282befc56ecae
treefa1bd79f4c99769aa35519ec6fc60c186b8cb762
parent7e13a55af9736af03587a7032b86b87f29f0bf29
cmdline: multiple host names dropped all but one host  (issue #168)

Change 1ed2bab broke multiple host names, either specified through
the --filename option, or listed on the commandline.  This was
due to well-intentioned refactoring of the hostname linked list
management which happened to lose all host names other than the
last name in the list.

I've fixed the append_to_names to walk the list of host names before
appending a new host name.  This does make the building of host names
O(n^2) rather than O(n), but I'm skeptical that will impact anyone's
life in a negative way, because it only happens at startup, and
it does simplify the code.

Also, multiple host names will now work in all non-interactive modes
(i.e. report, txt, json, xml, raw, csv) instead of just CSV mode.
mtr.c