This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: ga_server_test.c patch
- From: Jonathan Larmour <jifl at eCosCentric dot com>
- To: Sergei Gavrikov <sg at sgs dot gomel dot by>
- Cc: eCos patches list <ecos-patches at ecos dot sourceware dot org>
- Date: Tue, 19 Dec 2006 01:44:42 +0000
- Subject: Re: ga_server_test.c patch
- References: <Pine.LNX.4.63.0612182239040.21838@darkstar.example.org>
Sergei Gavrikov wrote:
Hello,
recently, I did try to build one Gary's test
% make -C net/common/current tests TESTS=tests/ga_server_test
I don't know about old BSD flags fashion. It seems that is a need to
update `flags' argument in call of getnameinfo().
Your change looks right. I'm committing it. Thanks!
RFC: What is more legal call in that test
getnameinfo (..., NI_NUMERICHOST)
or
getnameinfo (..., NI_NUMERICHOST | NI_NUMERICSERV) ?
For the purposes of this test, just NI_NUMERICHOST should do. If we don't
know the port, it will fall back to numeric anyway.
Jifl
------------------------------------------------------------------------
diff -urN net/common/current/ChangeLog net/common/current/ChangeLog.new
--- net/common/current/ChangeLog
+++ net/common/current/ChangeLog.new
@@ -1,3 +1,8 @@
+2006-12-18 Sergei Gavrikov <sg@sgs.gomel.by>
+
+ * tests/ga_server_test.c: Updated flags argument in call of
+ getnameinfo().
+
2006-05-25 Andrew Lunn <andrew.lunn@ascom.ch>
* cdl/net.cdl: Fix calculation of TFTPD stack
diff -urN net/common/current/tests/ga_server_test.c net/common/current/tests/ga_server_test.c.new
--- net/common/current/tests/ga_server_test.c
+++ net/common/current/tests/ga_server_test.c.new
@@ -122,7 +122,7 @@
if (getnameinfo (&client_addr, client_len,
host_addr_buf, sizeof(host_addr_buf),
host_port_buf, sizeof(host_port_buf),
- NI_NUMERIC) == EAI_NONE) {
+ NI_NUMERICHOST) == EAI_NONE) {
diag_printf("connection from %s(%s)\n", host_addr_buf, host_port_buf);
diag_sprintf(buf, "Hello %s(%s)\n", host_addr_buf, host_port_buf);
} else {
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
------["The best things in life aren't things."]------ Opinions==mine