Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
	* sysdeps/posix/getaddrinfo.c: Correct modifications done for
	PR1515.  Patch by Hideaki YOSHIFUJI <yoshfuji@ecei.tohoku.ac.jp>.
  • Loading branch information
Ulrich Drepper committed Jan 18, 2000
1 parent 9281f45 commit 3a47453
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
2000-01-18 Ulrich Drepper <drepper@cygnus.com>

* sysdeps/posix/getaddrinfo.c: Correct modifications done for
PR1515. Patch by Hideaki YOSHIFUJI <yoshfuji@ecei.tohoku.ac.jp>.

* posix/regex.h (RE_SYNTAX_POSIX_EXTENDED): Add RE_CONTEXT_INVALID_OPS.
* posix/regex.c (regex_compile): Return appropriate errors for
unterminated brace expressions. Detect invalid characters
Expand Down
24 changes: 14 additions & 10 deletions sysdeps/posix/getaddrinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ struct gaih_typeproto

static struct gaih_typeproto gaih_inet_typeproto[] =
{
{ 0, 0, NULL },
{ SOCK_STREAM, IPPROTO_TCP, (char *) "tcp" ,0 },
{ 0, 0, NULL, 0 },
{ SOCK_STREAM, IPPROTO_TCP, (char *) "tcp", 0 },
{ SOCK_DGRAM, IPPROTO_UDP, (char *) "udp", 0 },
{ SOCK_RAW, IPPROTO_RAW, (char *) "raw", GAI_PROTO_NOSERVICE },
{ 0, 0, NULL, 0 }
Expand Down Expand Up @@ -145,10 +145,10 @@ gaih_local (const char *name, const struct gaih_service *service,
struct gaih_typeproto *tp = gaih_inet_typeproto + 1;

while (tp->name != NULL
&& (req->ai_socktype != tp->socktype || req->ai_socktype == 0)
&& ((tp->protoflag & GAI_PROTO_NOSERVICE) != 0
|| req->ai_protocol != tp->protocol
|| req->ai_protocol == 0))
|| (req->ai_socktype != 0 && req->ai_socktype != tp->socktype)
|| (req->ai_protocol != 0
&& req->ai_protocol != tp->protocol)))
++tp;

if (tp->name == NULL)
Expand Down Expand Up @@ -299,10 +299,9 @@ gaih_inet (const char *name, const struct gaih_service *service,
++tp;

while (tp->name != NULL
&& (req->ai_socktype != tp->socktype || req->ai_socktype == 0)
&& ((tp->protoflag & GAI_PROTO_NOSERVICE) != 0
|| req->ai_protocol != tp->protocol
|| req->ai_protocol == 0))
&& ((req->ai_socktype != 0 && req->ai_socktype != tp->socktype)
|| (req->ai_protocol != 0
&& req->ai_protocol != tp->protocol)))
++tp;

if (tp->name == NULL)
Expand Down Expand Up @@ -334,7 +333,12 @@ gaih_inet (const char *name, const struct gaih_service *service,
struct gaih_servtuple **pst = &st;
for (tp++; tp->name; tp++)
{
struct gaih_servtuple *newp = (struct gaih_servtuple *)
struct gaih_servtuple *newp;

if ((tp->protoflag & GAI_PROTO_NOSERVICE) != 0)
continue;

newp = (struct gaih_servtuple *)
__alloca (sizeof (struct gaih_servtuple));

if ((rc = gaih_inet_serv (service->name, tp, newp)))
Expand Down

0 comments on commit 3a47453

Please sign in to comment.