www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-0.2 required=5.0 tests=BAYES_00,J_CHICKENPOX_44,J_CHICKENPOX_54,J_CHICKENPOX_73,SARE_MSGID_LONG40,SPF_PASS |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
Date: | Thu, 6 Aug 2009 20:48:24 +0800 |
Message-ID: | <a837b0ef0908060548q37bdb12blb60a6ffd58162c13@mail.gmail.com> |
Subject: | 1.7.0: getnameinfo bug |
From: | Zhiming Zhou <qexing AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
This bug happens on every 1.7.0 beta version. I use getnameinfo function with NI_NUMERICHOST flag, if the "sin_port" of sockaddr is a known port(like 21, 80...) in "/etc/services" file, getnameinfo function works ok, and service name is correctly fetched(ftp, http...). however if I fill "sin_port" with an unknown port(like 6400, 6499) getnameinfo returns EAI_NODATA, and if i add a 6400 or 6499 service entry in "/etc/services" file, getnameinfo works ok again. So, I move the code to Linux, it works ok either "sin_port" is known or unknown, if port is known(like 21), service name is fetched(ftp), if not(6400), service name is filled with port number(6400), and it works very good :) Any helps? Thanks Zhiming Zhou -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |