MINIFI-159: Create AppendHostInfo processor#27
MINIFI-159: Create AppendHostInfo processor#27randerzander wants to merge 3 commits intoapache:masterfrom randerzander:master
Conversation
|
I believe the CI failure is due to broken appveyor build configuration |
|
reviewing |
apiri
left a comment
There was a problem hiding this comment.
Hey @randerzander,
Overall looks good and works as anticipated. Had a few comments. Let me know your thoughts.
libminifi/src/AppendHostInfo.cpp
Outdated
| return; | ||
|
|
||
| //Get Hostname | ||
| char hostname[1024]; |
There was a problem hiding this comment.
Is there a reason 1024 is used? By spec, it is no more than 255 but may be lower depending on OS implementation. limits.h has a HOST_NAME_MAX that contains this to get more precision on this instantiation
| flow->addAttribute(hostAttribute.c_str(), h->h_name); | ||
|
|
||
| //Get IP address for the specified interface | ||
| std::string iface; |
There was a problem hiding this comment.
What is the appropriate path if the interface specified does not exist? Before adjusting, this currently returns 1.0.0.0. Would it make sense, should the interface not be found, to omit the inclusion of the attribute and value?
…constants instead of magic numbers
|
Hey @randerzander. Changes look good. Will get this merged in. Thanks for the contrib, definitely seems like it would be helpful. |
This closes apache#27. Signed-off-by: Aldrin Piri <aldrin@apache.org>
No description provided.