ga_server_test.c patch

Sergei Gavrikov sg@sgs.gomel.by
Mon Dec 18 21:02:00 GMT 2006


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().

RFC: What is more legal call in that test

 	getnameinfo (..., NI_NUMERICHOST)

or
 	getnameinfo (..., NI_NUMERICHOST | NI_NUMERICSERV) ?

Thanks,

Sergei
-------------- next part --------------
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 {


More information about the Ecos-patches mailing list