https://bugzilla.novell.com/show_bug.cgi?id=288879#c29
Ralf Haferkamp changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rhafer@novell.com
AssignedTo|rhafer@novell.com |pbaudis@novell.com
Status|NEEDINFO |NEW
Info Provider|pbaudis@novell.com |
--- Comment #29 from Ralf Haferkamp 2007-11-30 02:21:13 MST ---
I did some more testing and I really thing this is a glibc bug (OpenLDAP
upstream seems to agree with that as well).
E.g. the following code calls getaddrinfo() twice with the same parameters and
returns different results for both calls (1. call returns two addrinfo structs,
2. call returns three). How can this be desired?
-------------------------------------------
#include
#include
#include
#include
#include
#include
#include
int main () {
int rc;
struct addrinfo hints, *res, *iter;
int ret, count;
memset( &hints, '\0', sizeof(hints) );
hints.ai_flags = AI_PASSIVE | AI_CANONNAME;
hints.ai_socktype = SOCK_STREAM;
hints.ai_family = AF_UNSPEC;
ret = getaddrinfo("localhost", "9009", &hints, &res);
for (iter = res, count=0; iter; count++, iter = iter->ai_next) { }
printf("1. getaddrinfo: %d results\n", count);
ret = getaddrinfo("localhost", "9009", &hints, &res);
printf("getaddrinfo returned %d\n",ret);
if (ret) {
exit(1);
}
for (iter = res, count=0; iter; count++, iter = iter->ai_next) { }
printf("2. getaddrinfo: %d results\n", count);
}
----------------------------------------------
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.