From: Zdeněk Salvet Date: Wed, 28 Jul 2010 14:12:48 +0000 (+0000) Subject: Ignore scope identifier in IPv6 literal, it is not supported by c-ares X-Git-Tag: glite-security-gsoap-plugin_R_2_1_2_2~11 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=d8eb7e96b1830c482977f2059fdcc26e11122a51;p=jra1mw.git Ignore scope identifier in IPv6 literal, it is not supported by c-ares on input. --- diff --git a/org.glite.security.gss/src/glite_gss.c b/org.glite.security.gss/src/glite_gss.c index 32f0c2b..bb38f31 100644 --- a/org.glite.security.gss/src/glite_gss.c +++ b/org.glite.security.gss/src/glite_gss.c @@ -151,7 +151,7 @@ static int asyn_getservbyname(struct sockaddr_storage *addrOut, socklen_t *a_len struct timeval tv, *tvp; struct timeval start_time,check_time; int err = NETDB_INTERNAL; - char *name2; + char *name2, *p; size_t namelen; name2 = name; @@ -162,6 +162,9 @@ static int asyn_getservbyname(struct sockaddr_storage *addrOut, socklen_t *a_len if (!name2) return NETDB_INTERNAL; name2[namelen-1] = '\0'; name2++; + /* Ignore scope identifier, not supported by c-ares */ + p = strchr(name2, '%'); + if (p) *p = '\0'; } /* start timer */