diff options
author | corvid <devnull@localhost> | 2014-09-06 01:33:54 +0000 |
---|---|---|
committer | corvid <devnull@localhost> | 2014-09-06 01:33:54 +0000 |
commit | f4071f542daed6136c66beb68251de7d89a0d4de (patch) | |
tree | 5156b13306b52a4c19ce6b513172ba6e5367fae6 | |
parent | 379c752f815d4e89174841041421136be3178283 (diff) |
don't need port defines in url.h
-rw-r--r-- | src/IO/http.c | 6 | ||||
-rw-r--r-- | src/url.h | 9 |
2 files changed, 4 insertions, 11 deletions
diff --git a/src/IO/http.c b/src/IO/http.c index 16800dcf..c95f7151 100644 --- a/src/IO/http.c +++ b/src/IO/http.c @@ -48,6 +48,8 @@ D_STMT_START { \ #define _MSG_BW(web, root, ...) +static const int HTTP_PORT = 80; + static const int HTTP_SOCKET_USE_PROXY = 0x1; static const int HTTP_SOCKET_QUEUED = 0x4; static const int HTTP_SOCKET_TO_BE_FREED = 0x8; @@ -455,7 +457,7 @@ static int Http_connect_socket(ChainLink *Info) struct sockaddr_in *sin = (struct sockaddr_in *)&name; socket_len = sizeof(struct sockaddr_in); sin->sin_family = dh->af; - sin->sin_port = S->port ? htons(S->port) : htons(DILLO_URL_HTTP_PORT); + sin->sin_port = S->port ? htons(S->port) : htons(HTTP_PORT); memcpy(&sin->sin_addr, dh->data, (size_t)dh->alen); if (a_Web_valid(S->web) && (S->web->flags & WEB_RootUrl)) MSG("Connecting to %s\n", inet_ntoa(sin->sin_addr)); @@ -469,7 +471,7 @@ static int Http_connect_socket(ChainLink *Info) socket_len = sizeof(struct sockaddr_in6); sin6->sin6_family = dh->af; sin6->sin6_port = - S->port ? htons(S->port) : htons(DILLO_URL_HTTP_PORT); + S->port ? htons(S->port) : htons(HTTP_PORT); memcpy(&sin6->sin6_addr, dh->data, dh->alen); inet_ntop(dh->af, dh->data, buf, sizeof(buf)); if (a_Web_valid(S->web) && (S->web->flags & WEB_RootUrl)) @@ -13,15 +13,6 @@ #include "../dlib/dlib.h" -#define DILLO_URL_HTTP_PORT 80 -#define DILLO_URL_HTTPS_PORT 443 -#define DILLO_URL_FTP_PORT 21 -#define DILLO_URL_MAILTO_PORT 25 -#define DILLO_URL_NEWS_PORT 119 -#define DILLO_URL_TELNET_PORT 23 -#define DILLO_URL_GOPHER_PORT 70 - - /* * Values for DilloUrl->flags. * Specifies which which action to perform with an URL. |