- fix logic error
authorMichael Wallner <mike@php.net>
Wed, 7 Dec 2005 21:16:36 +0000 (21:16 +0000)
committerMichael Wallner <mike@php.net>
Wed, 7 Dec 2005 21:16:36 +0000 (21:16 +0000)
http_url_api.c

index 9e87bae42496e3bc887b8eaac8d1f4f8abcd2db4..d4f10e9dc6711d887f34aca69024c2b6d4f87d3b 100644 (file)
@@ -136,7 +136,7 @@ PHP_HTTP_API char *_http_absolute_url_ex(
        if (    (!strcmp(furl.scheme, "http") && (furl.port != 80)) ||
                        (!strcmp(furl.scheme, "https") && (furl.port != 443))
 #if defined(PHP_WIN32) || defined(HAVE_NETDB_H)
-               ||      ((se = getservbyname(furl.scheme, "tcp")) && (ntohs(se->s_port) != furl.port))
+               ||      ((!(se = getservbyname(furl.scheme, "tcp"))) || (ntohs(se->s_port) != furl.port))
 #endif
                ) {
                char port_string[8] = {0};