Sorry,

This one is the fixed one. The earlier one was creating problem. Thanks.

Regards--
Subrata

On Mon, 2009-02-23 at 12:39 +0530, Subrata Modak wrote:
> This still gives a hunk failure:
> 
> patching file testcases/network/ipv6/echo6/echoes6.c
> Hunk #1 FAILED at 41.
> 1 out of 1 hunk FAILED -- saving rejects to file
> testcases/network/ipv6/echo6/echoes6.c.rej
> 
> Regards--
> Subrata
> 
> On Tue, 2009-02-17 at 23:12 +0100, Jiri Palecek > wrote:
> > Resending due to line-wrapping issues
> > 
> >  echoes6 would segfault when the address couldn't be resolved, because
> >  it would try to read the address anyway. This patch makes it call
> >  exit() instead
> > 
> > Signed-off-by: Jiri Palecek <[email protected]>
> > ---
> >  testcases/network/ipv6/echo6/echoes6.c |   12 ++++++++----
> >  1 files changed, 8 insertions(+), 4 deletions(-)
> > 
> > diff --git a/testcases/network/ipv6/echo6/echoes6.c 
> > b/testcases/network/ipv6/echo6/echoes6.c
> > index 4166aa2..2bea83b 100644
> > --- a/testcases/network/ipv6/echo6/echoes6.c
> > +++ b/testcases/network/ipv6/echo6/echoes6.c
> > @@ -41,10 +41,14 @@ main (int argc,char *argv[],char *env[])
> >     memset(&hints, 0, sizeof(hints));
> >     hints.ai_family = PF_INET6;
> > 
> > -   if ((gai=getaddrinfo(argv[1], NULL, &hints, &hp))!=0) 
> > -                fprintf(stderr, "Unknown subject address %s: %s\n", 
> > argv[1], gai_strerror(gai));            
> > -   if (!hp->ai_addr || hp->ai_addr->sa_family != AF_INET6)
> > -                fprintf(stderr, "getaddrinfo failed");
> > +   if ((gai=getaddrinfo(argv[1], NULL, &hints, &hp))!=0) {
> > +           fprintf(stderr, "Unknown subject address %s: %s\n", argv[1], 
> > gai_strerror(gai));
> > +           exit(1);
> > +   }
> > +   if (!hp->ai_addr || hp->ai_addr->sa_family != AF_INET6) {
> > +           fprintf(stderr, "getaddrinfo failed");
> > +           exit(1);
> > +   }
> >     if ((sp=getservbyname("echo","tcp"))==NULL) {
> >             printf("ERROR service is not available\n");
> >             perror("echo");


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to