summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Reid <dreid@apache.org>2000-11-08 11:35:38 +0000
committerDavid Reid <dreid@apache.org>2000-11-08 11:35:38 +0000
commit33aabfee3fd2c840b50fd1a0dddeead1cdf8bb14 (patch)
tree55539bed9e940d581717d903ad4f2f845c072b75
parent2b00b3a71c58cc8bd645acd2644b64b7db5c8a6e (diff)
downloadhttpd-33aabfee3fd2c840b50fd1a0dddeead1cdf8bb14.tar.gz
Start of moving to apr_port_t in the server code. This will probably the first
of a few... git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86866 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--include/http_protocol.h4
-rw-r--r--include/httpd.h12
-rw-r--r--include/util_uri.h12
-rw-r--r--modules/http/http_core.c2
-rw-r--r--server/listen.c4
-rw-r--r--server/rfc1413.c4
-rw-r--r--server/util.c4
-rw-r--r--server/util_script.c2
-rw-r--r--server/util_uri.c4
-rw-r--r--server/vhost.c4
10 files changed, 26 insertions, 26 deletions
diff --git a/include/http_protocol.h b/include/http_protocol.h
index 112ca0d13f..b56c8225e7 100644
--- a/include/http_protocol.h
+++ b/include/http_protocol.h
@@ -552,9 +552,9 @@ AP_DECLARE_HOOK(const char *,http_method,(const request_rec *))
* Return the default port from the current request
* @param r The current request
* @return The current port
- * @deffunc unsigned short ap_run_default_port(const request_rec *r)
+ * @deffunc apr_port_t ap_run_default_port(const request_rec *r)
*/
-AP_DECLARE_HOOK(unsigned short,default_port,(const request_rec *))
+AP_DECLARE_HOOK(apr_port_t,default_port,(const request_rec *))
#ifdef __cplusplus
}
diff --git a/include/httpd.h b/include/httpd.h
index 76a0ea3ca9..6aa52234e6 100644
--- a/include/httpd.h
+++ b/include/httpd.h
@@ -904,7 +904,7 @@ struct server_addr_rec {
/** The bound address, for this server */
apr_in_addr host_addr;
/** The bound port, for this server */
- unsigned short host_port;
+ apr_port_t host_port;
/** The name given in <VirtualHost> */
char *virthost;
};
@@ -928,7 +928,7 @@ struct server_rec {
/** The server hostname */
char *server_hostname;
/** for redirects, etc. */
- unsigned short port;
+ apr_port_t port;
/* Log files --- note that transfer log is now in the modules... */
@@ -1277,10 +1277,10 @@ AP_DECLARE(char *) ap_escape_html(apr_pool_t *p, const char *s);
* @param port The port the server is running on
* @param r The current request
* @return The server's hostname
- * @deffunc char *ap_construct_server(apr_pool_t *p, const char *hostname, unsiged port, const request_rec *r)
+ * @deffunc char *ap_construct_server(apr_pool_t *p, const char *hostname, apr_port_t port, const request_rec *r)
*/
AP_DECLARE(char *) ap_construct_server(apr_pool_t *p, const char *hostname,
- unsigned port, const request_rec *r);
+ apr_port_t port, const request_rec *r);
/**
* Escape a shell command
* @param p The pool to allocate out of
@@ -1569,9 +1569,9 @@ char *ap_get_local_host(apr_pool_t *p);
* @param hostname The hostname to parse
* @param port The port found in the hostname
* @return The address of the server
- * @deffunc unsigned long ap_get_virthost_addr(char *hostname, unsigned shor *port)
+ * @deffunc unsigned long ap_get_virthost_addr(char *hostname, apr_port_t *port)
*/
-unsigned long ap_get_virthost_addr(char *hostname, unsigned short *port);
+unsigned long ap_get_virthost_addr(char *hostname, apr_port_t *port);
/*
* Redefine assert() to something more useful for an Apache...
diff --git a/include/util_uri.h b/include/util_uri.h
index a67ead165c..fc785fd8e8 100644
--- a/include/util_uri.h
+++ b/include/util_uri.h
@@ -78,7 +78,7 @@ struct schemes_t {
/** The name of the scheme */
const char *name;
/** The default port for the scheme */
- unsigned short default_port;
+ apr_port_t default_port;
};
#define DEFAULT_FTP_DATA_PORT 20
@@ -128,7 +128,7 @@ struct uri_components {
struct hostent *hostent;
/** The port number, numeric, valid only if port_str != NULL */
- unsigned short port;
+ apr_port_t port;
/** has the structure been initialized */
unsigned is_initialized:1;
@@ -145,17 +145,17 @@ struct uri_components {
* http, ftp, https, gopher, wais, nntp, snews, and prospero
* @param scheme_str The string that contains the current scheme
* @return The default port for this scheme
- * @deffunc unsigned short ap_default_port_for_scheme(const char *scheme_str)
+ * @deffunc apr_port_t ap_default_port_for_scheme(const char *scheme_str)
*/
-AP_DECLARE(unsigned short) ap_default_port_for_scheme(const char *scheme_str);
+AP_DECLARE(apr_port_t) ap_default_port_for_scheme(const char *scheme_str);
/**
* Return the default for the current request
* @param r The current request
* @return The default port
- * @deffunc unsigned short ap_default_port_for_request(const request_rec *r)
+ * @deffunc apr_port_t ap_default_port_for_request(const request_rec *r)
*/
-AP_DECLARE(unsigned short) ap_default_port_for_request(const request_rec *r);
+AP_DECLARE(apr_port_t) ap_default_port_for_request(const request_rec *r);
/**
* Create a copy of a "struct hostent" record; it was presumably returned
diff --git a/modules/http/http_core.c b/modules/http/http_core.c
index 7c359f84fc..74e2a94a1b 100644
--- a/modules/http/http_core.c
+++ b/modules/http/http_core.c
@@ -766,7 +766,7 @@ AP_DECLARE(const char *) ap_get_server_name(request_rec *r)
AP_DECLARE(unsigned) ap_get_server_port(const request_rec *r)
{
- unsigned port;
+ apr_port_t port;
core_dir_config *d =
(core_dir_config *)ap_get_module_config(r->per_dir_config, &core_module);
diff --git a/server/listen.c b/server/listen.c
index fb9edd7455..997a2e0eb8 100644
--- a/server/listen.c
+++ b/server/listen.c
@@ -83,7 +83,7 @@ static apr_status_t make_sock(apr_pool_t *p, ap_listen_rec *server)
int one = 1;
char addr[512];
apr_status_t stat;
- apr_uint32_t port;
+ apr_port_t port;
char *ipaddr;
apr_get_local_port(&port,s);
@@ -178,7 +178,7 @@ static void alloc_listener(process_rec *process, char *addr, unsigned int port)
ap_listen_rec *new;
apr_status_t status;
char *oldaddr;
- unsigned int oldport;
+ apr_port_t oldport;
/* see if we've got an old listener for this address:port */
for (walk = &old_listeners; *walk; walk = &(*walk)->next) {
diff --git a/server/rfc1413.c b/server/rfc1413.c
index 1008705723..9535d9eb0d 100644
--- a/server/rfc1413.c
+++ b/server/rfc1413.c
@@ -112,8 +112,8 @@ static int get_rfc1413(apr_socket_t *sock, const char *local_ip,
const char *rmt_ip,
char user[RFC1413_USERLEN+1], server_rec *srv)
{
- unsigned int rmt_port, our_port;
- unsigned int sav_rmt_port, sav_our_port;
+ apr_port_t rmt_port, our_port;
+ apr_port_t sav_rmt_port, sav_our_port;
apr_status_t status;
int i;
char *cp;
diff --git a/server/util.c b/server/util.c
index 3eccf5ed9d..ab5afea3bb 100644
--- a/server/util.c
+++ b/server/util.c
@@ -1557,7 +1557,7 @@ AP_DECLARE(int) ap_unescape_url(char *url)
}
AP_DECLARE(char *) ap_construct_server(apr_pool_t *p, const char *hostname,
- unsigned port, const request_rec *r)
+ apr_port_t port, const request_rec *r)
{
if (ap_is_default_port(port, r))
return apr_pstrdup(p, hostname);
@@ -1846,7 +1846,7 @@ AP_DECLARE(gid_t) ap_gname2id(const char *name)
* Parses a host of the form <address>[:port]
* :port is permitted if 'port' is not NULL
*/
-unsigned long ap_get_virthost_addr(char *w, unsigned short *ports)
+unsigned long ap_get_virthost_addr(char *w, apr_port_t *ports)
{
struct hostent *hep;
unsigned long my_addr;
diff --git a/server/util_script.c b/server/util_script.c
index 397340fa30..4eb861742f 100644
--- a/server/util_script.c
+++ b/server/util_script.c
@@ -166,7 +166,7 @@ AP_DECLARE(void) ap_add_common_vars(request_rec *r)
apr_array_header_t *hdrs_arr = apr_table_elts(r->headers_in);
apr_table_entry_t *hdrs = (apr_table_entry_t *) hdrs_arr->elts;
int i;
- apr_uint32_t rport;
+ apr_port_t rport;
/* use a temporary apr_table_t which we'll overlap onto
* r->subprocess_env later
diff --git a/server/util_uri.c b/server/util_uri.c
index 71d62dc9d8..fa4293df59 100644
--- a/server/util_uri.c
+++ b/server/util_uri.c
@@ -94,7 +94,7 @@ static schemes_t schemes[] =
};
-AP_DECLARE(unsigned short) ap_default_port_for_scheme(const char *scheme_str)
+AP_DECLARE(apr_port_t) ap_default_port_for_scheme(const char *scheme_str)
{
schemes_t *scheme;
@@ -105,7 +105,7 @@ AP_DECLARE(unsigned short) ap_default_port_for_scheme(const char *scheme_str)
return 0;
}
-AP_DECLARE(unsigned short) ap_default_port_for_request(const request_rec *r)
+AP_DECLARE(apr_port_t) ap_default_port_for_request(const request_rec *r)
{
return (r->parsed_uri.scheme)
? ap_default_port_for_scheme(r->parsed_uri.scheme)
diff --git a/server/vhost.c b/server/vhost.c
index b1601a0147..ede5b96f56 100644
--- a/server/vhost.c
+++ b/server/vhost.c
@@ -854,7 +854,7 @@ static void check_hostalias(request_rec *r)
* names we'll match have ports associated with them
*/
const char *host = r->hostname;
- unsigned port;
+ apr_port_t port;
server_rec *s;
server_rec *last_s;
name_chain *src;
@@ -914,7 +914,7 @@ static void check_serverpath(request_rec *r)
server_rec *s;
server_rec *last_s;
name_chain *src;
- unsigned port;
+ apr_port_t port;
apr_get_local_port(&port, r->connection->client_socket);
/*