delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
Date: | Sun, 14 Jun 2009 02:00:28 -0400 |
From: | Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: [BUG 1.7 getopt_long() and recv()] has problem for tftp-hpa-5.0 on cygwin-1.7/win2003 |
Message-ID: | <20090614060028.GA22148@ednor.casa.cgf.cx> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <675149 DOT 63397 DOT qm AT web110509 DOT mail DOT gq1 DOT yahoo DOT com> |
MIME-Version: | 1.0 |
In-Reply-To: | <675149.63397.qm@web110509.mail.gq1.yahoo.com> |
User-Agent: | Mutt/1.5.19 (2009-01-05) |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 |
On Sat, Jun 13, 2009 at 07:53:10PM -0700, Xiaoqiang Zheng wrote: >to make the 2 BUGs more clear: > >* in the while loop of processing options with '-' using getopt_long(): > >$ tftpd/tftpd -u SYSTEM -L -vvvv -p -c -s /var/log > >1. it seems the '-<x> <value>'(-u SYSTEM) argument pairs that pass the second argument as value have the value lost and the variable get null value. the '-<x>'(-L -p -c -s; -vvvv is a special one) type arguments that set some flag seems work well. > >2. the value of 'optind' is always 1 in each loop(-vvvv is a special one?). but it would have be increased by 1 in each loop. after all the '-<x>' and '-<x> <value>' arguments being processed, its value. > >3. because the value of optind not increased 1 for each loop, so that the arguments '/var/log' at the end that pass value(s) get processed in a wrong way as the optind is used for 'argv[optind]' to set value to some variable(s). > > >* recv() returns -1 with error 14 when it read acknolege packet from the socket, the normal return value is 4. Chuck's analysis of 1. seems spot on. Corinna should have fixed 2. earlier today. Her fix should be in the latest snapshot at http://cygwin.com/snapshots/ cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |