Package: libc6
Version: 2.10.1-7

Programs which use getaddrinfo() to resolve addresses fail most of the
time. I tried to get to the bottom of the error and came up with the
following little program, that exhibits the error.

test.c
===
#include <errno.h>
#include <stdio.h>
#include <netdb.h>
#include <string.h>

int main(void)
{
        struct addrinfo * result;
        int error;

        error = getaddrinfo("ftp.de.debian.org", "http", NULL, &result);
        if(error != 0)
        {
                fprintf(stderr, "error in getaddrinfo: %d / %s\n", error,
gai_strerror(error));
                if(error == EAI_SYSTEM)
                {
                        fprintf(stderr, "system error: %d / %s\n", errno, 
strerror(errno));
                }
                
                return 1;
        }
        freeaddrinfo(result);
        
        return 0;
}
===

The output is as follows, which seems wrong in itself to me.
===
error in getaddrinfo: -11 / System error
system error: 0 / Success
===

Now the thing is, when I replace the service string "http" with NULL,
it works perfectly. But "ftp.de.debian.org:http" for instance is what
aptitude wants to query and it fails which makes my system
un-upgradable at the moment.

Thanks for your time,

Hagen.

-- 
Hagen Möbius
Lychener Str. 81, 10437 Berlin, Germany
Home: +49 30 4450091
Cell: +49 179 5853897
Mail: [email protected]



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to