diff --git a/STATUS b/STATUS index 4e06b1c4e4..573b5391db 100644 --- a/STATUS +++ b/STATUS @@ -1,5 +1,5 @@ Apache 2.0 STATUS: -Last modified at [$Date: 1999/11/16 15:11:51 $] +Last modified at [$Date: 1999/11/16 18:30:18 $] Release: @@ -118,8 +118,6 @@ Other features that need writing: * TODO in source -- just do an egrep on "TODO" and see what's there - * Odd comments in source (egrep for "ZZZ") need to be cleaned-up - * Work on other MPMs. Possible MPMs discussed or in progress include: - Dean Gaudet's async MPM diff --git a/modules/http/http_core.c b/modules/http/http_core.c index a8597b67b9..488169a457 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -518,8 +518,6 @@ char *ap_response_code_string(request_rec *r, int error_index) /* Code from Harald Hanche-Olsen */ -/* ZZZ let's pass the buffer and the host entry so we don't have to allocate - another stack frame. */ static ap_inline void do_double_reverse (conn_rec *conn) { struct hostent *hptr; @@ -533,8 +531,8 @@ static ap_inline void do_double_reverse (conn_rec *conn) conn->double_reverse = -1; return; } - hptr = gethostbyname(conn->remote_host); /*ZZZ change to AP func */ - if (hptr) { /*ZZZ enumerate through host entries */ + hptr = gethostbyname(conn->remote_host); + if (hptr) { char **haddr; for (haddr = hptr->h_addr_list; *haddr; haddr++) { @@ -573,7 +571,6 @@ API_EXPORT(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, && conn->remote_host == NULL && (type == REMOTE_DOUBLE_REV || hostname_lookups != HOSTNAME_LOOKUP_OFF)) { - /* ZZZ change to AP functions. */ iaddr = &(conn->remote_addr.sin_addr); hptr = gethostbyaddr((char *)iaddr, sizeof(struct in_addr), AF_INET); if (hptr != NULL) { @@ -2511,7 +2508,6 @@ static int default_handler(request_rec *r) if (r->method_number == M_PUT) { return METHOD_NOT_ALLOWED; } - /* ZZZ can we store if the file exists or not? */ if (r->finfo.st_mode == 0 || (r->path_info && *r->path_info)) { ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, r, "File does not exist: %s",r->path_info ? diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 492774cded..8ced100721 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -313,7 +313,6 @@ API_EXPORT(int) ap_set_keepalive(request_rec *r) ((r->proto_num >= HTTP_VERSION(1,1)) && (r->chunked = 1))) && /* THIS CODE IS CORRECT, see comment above. */ r->server->keep_alive && - /* ZZZ change to APR keepalive timeout defined value */ (r->server->keep_alive_timeout > 0) && ((r->server->keep_alive_max == 0) || (r->server->keep_alive_max > r->connection->keepalives)) && @@ -382,7 +381,6 @@ API_EXPORT(time_t) ap_rationalize_mtime(request_rec *r, time_t mtime) * were given a time in the future, we return the current time - the * Last-Modified can't be in the future. */ - /* ZZZ Change time call to use time AP time thread functions. */ now = (mtime < r->request_time) ? r->request_time : time(NULL); return (mtime > now) ? now : mtime; } @@ -408,7 +406,6 @@ API_EXPORT(int) ap_meets_conditions(request_rec *r) return OK; } - /* ZZZ We are changing time(NULL) to AP time thread functions. */ mtime = (r->mtime != 0) ? r->mtime : time(NULL); /* If an If-Match request-header field was given diff --git a/modules/http/http_request.c b/modules/http/http_request.c index 48aecda7d9..7fe520e584 100644 --- a/modules/http/http_request.c +++ b/modules/http/http_request.c @@ -116,7 +116,6 @@ IMPLEMENT_HOOK_RUN_FIRST(int,auth_checker,(request_rec *r),(r),DECLINED) static int check_safe_file(request_rec *r) { - /* ZZZ change to AP defines */ if (r->finfo.st_mode == 0 /* doesn't exist */ || S_ISDIR(r->finfo.st_mode) || S_ISREG(r->finfo.st_mode) @@ -261,21 +260,18 @@ static int get_path_info(request_rec *r) } else { errno = 0; - /* ZZZ change to AP func for File Info */ rv = stat(path, &r->finfo); } if (cp != end) *cp = '/'; - if (!rv) { /* ZZZ AP Status check here */ - + if (!rv) { /* * Aha! Found something. If it was a directory, we will search * contents of that directory for a multi_match, so the PATH_INFO * argument starts with the component after that. */ - /* ZZZ use AP file type checking defines */ if (S_ISDIR(r->finfo.st_mode) && last_cp) { r->finfo.st_mode = 0; /* No such file... */ cp = last_cp; @@ -290,8 +286,6 @@ static int get_path_info(request_rec *r) */ r->finfo.st_mode = 0; - /* ZZZ Let's throw some AP Errno checking in here and get rid of the - #defines. */ #if defined(ENOENT) && defined(ENOTDIR) if (errno == ENOENT || errno == ENOTDIR) { last_cp = cp; @@ -303,7 +297,7 @@ static int get_path_info(request_rec *r) --cp; } else { -#if defined(EACCES) /* ZZZ again, AP error checking. */ +#if defined(EACCES) if (errno != EACCES) #endif ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r, @@ -442,8 +436,7 @@ static int directory_walk(request_rec *r) if (test_filename[test_filename_len - 1] == '/') --num_dirs; - if (S_ISDIR(r->finfo.st_mode)) /* zzz use AP funcs and defines to make - this quicker */ + if (S_ISDIR(r->finfo.st_mode)) ++num_dirs; /* @@ -578,7 +571,7 @@ static int directory_walk(request_rec *r) * S_ISDIR test. But if you accessed /symlink/index.html, for example, * you would *not* get the 403. */ - if (!S_ISDIR(r->finfo.st_mode) /* ZZZ use AP funcs and defines */ + if (!S_ISDIR(r->finfo.st_mode) && (res = check_symlinks(r->filename, ap_allow_options(r)))) { ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r, "Symbolic link not allowed: %s", r->filename); @@ -867,7 +860,6 @@ API_EXPORT(request_rec *) ap_sub_req_lookup_file(const char *new_file, rnew->filename = ap_make_full_path(rnew->pool, fdir, new_file); ap_parse_uri(rnew, rnew->uri); /* fill in parsed_uri values */ - /* ZZZ use AP funcs to get File Info */ if (stat(rnew->filename, &rnew->finfo) < 0) { rnew->finfo.st_mode = 0; } @@ -883,7 +875,6 @@ API_EXPORT(request_rec *) ap_sub_req_lookup_file(const char *new_file, * no matter what, if it's a subdirectory, we need to re-run * directory_walk */ - /* ZZZ use AP funcs and defines for this. */ if (S_ISDIR(rnew->finfo.st_mode)) { res = directory_walk(rnew); if (!res) { diff --git a/os/beos/beosd.c b/os/beos/beosd.c index 90ad98b3b5..1e3c0cc5fa 100644 --- a/os/beos/beosd.c +++ b/os/beos/beosd.c @@ -70,7 +70,7 @@ void beosd_detach(void) chdir("/"); -/* ZZZ +/* * fork() is evil if we're also doing spawn_thread...so we don't use it. * This means that it won't detach properly, so we'll have to find a way * round this. diff --git a/server/config.c b/server/config.c index 1544040ace..7e102b1494 100644 --- a/server/config.c +++ b/server/config.c @@ -1021,14 +1021,14 @@ void ap_process_resource_config(server_rec *s, const char *fname, ap_context_t * if (!(strcmp(fname, ap_server_root_relative(p, RESOURCE_CONFIG_FILE))) || !(strcmp(fname, ap_server_root_relative(p, ACCESS_CONFIG_FILE)))) { - if (stat(fname, &finfo) == -1) /* ZZZ can we read the file? ACCESS better here. */ + if (stat(fname, &finfo) == -1) return; } /* don't require conf/httpd.conf if we have a -C or -c switch */ if((ap_server_pre_read_config->nelts || ap_server_post_read_config->nelts) && !(strcmp(fname, ap_server_root_relative(p, SERVER_CONFIG_FILE)))) { - if (stat(fname, &finfo) == -1) /* ZZZ can we read the file? ACCESS better here. */ + if (stat(fname, &finfo) == -1) return; } @@ -1041,7 +1041,6 @@ void ap_process_resource_config(server_rec *s, const char *fname, ap_context_t * parms.override = (RSRC_CONF | OR_ALL) & ~(OR_AUTHCFG | OR_LIMIT); if (ap_pcfg_openfile(&parms.config_file, p, fname) != APR_SUCCESS) { - /* ZZZ use ap_strerror() once it exists to print an error message */ fprintf(stderr, "%s: could not open document config file %s\n", ap_server_argv0, fname); exit(1); @@ -1262,14 +1261,13 @@ static server_rec *init_server_config(process_rec *process, ap_context_t *p) s->limit_req_line = DEFAULT_LIMIT_REQUEST_LINE; s->limit_req_fieldsize = DEFAULT_LIMIT_REQUEST_FIELDSIZE; s->limit_req_fields = DEFAULT_LIMIT_REQUEST_FIELDS; - s->timeout = DEFAULT_TIMEOUT; /*ZZZ use AP default timeouts here*/ + s->timeout = DEFAULT_TIMEOUT; s->keep_alive_timeout = DEFAULT_KEEPALIVE_TIMEOUT; s->keep_alive_max = DEFAULT_KEEPALIVE; s->keep_alive = 1; s->next = NULL; s->addrs = ap_pcalloc(p, sizeof(server_addr_rec)); /* NOT virtual host; don't match any real network interface */ - /* ZZZ Initialize the Network Address here. */ s->addrs->host_addr.s_addr = htonl(INADDR_ANY); s->addrs->host_port = 0; /* matches any port */ s->addrs->virthost = ""; /* must be non-NULL */ diff --git a/server/connection.c b/server/connection.c index de55aba4f4..a3bbd78792 100644 --- a/server/connection.c +++ b/server/connection.c @@ -103,14 +103,14 @@ IMPLEMENT_HOOK_RUN_FIRST(int,process_connection,(conn_rec *c),(c),DECLINED) #ifdef USE_SO_LINGER #define NO_LINGCLOSE /* The two lingering options are exclusive */ -static void sock_enable_linger(int s) /* // ZZZZZ abstract the socket, s */ +static void sock_enable_linger(int s) { - struct linger li; /* // ZZZZZ SocketOptions... */ + struct linger li; li.l_onoff = 1; li.l_linger = MAX_SECS_TO_LINGER; - if (setsockopt(s, SOL_SOCKET, SO_LINGER, /* // ZZZZZ abstract, return SUCCESS or not */ + if (setsockopt(s, SOL_SOCKET, SO_LINGER, (char *) &li, sizeof(struct linger)) < 0) { ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, "setsockopt: (SO_LINGER)"); @@ -130,10 +130,9 @@ static void sock_enable_linger(int s) /* // ZZZZZ abstract the socket, s */ * distinguish between a dropped connection and something that might be * worth logging. */ -/*ZZZ this routine needs to be adapted for use with poll()*/ static void lingering_close(request_rec *r) { - /*ZZZ remove the hardwired 512. This is an IO Buffer Size */ + /*TODO remove the hardwired 512. This is an IO Buffer Size */ char dummybuf[512]; struct pollfd pd; int lsd; @@ -156,7 +155,7 @@ static void lingering_close(request_rec *r) lsd = r->connection->client->fd; - if ((shutdown(lsd, 1) != 0) /* ZZZ abstract shutdown */ + if ((shutdown(lsd, 1) != 0) || ap_is_aborted(r->connection)) { ap_bclose(r->connection->client); return; @@ -184,7 +183,7 @@ static void lingering_close(request_rec *r) pd.revents = 0; } while ((poll(&pd, 1, 2) == 1) && read(lsd, dummybuf, sizeof(dummybuf))); - /* && (time() = epoch) < max_wait); */ /* ZZZZ time function is not good... */ + /* && (time() = epoch) < max_wait); */ /* Should now have seen final ack. Safe to finally kill socket */ ap_bclose(r->connection->client); diff --git a/server/mpm/dexter/dexter.c b/server/mpm/dexter/dexter.c index cba006b858..0f7b24c897 100644 --- a/server/mpm/dexter/dexter.c +++ b/server/mpm/dexter/dexter.c @@ -704,7 +704,7 @@ static int setup_listeners(server_rec *s) */ #if defined(TCP_NODELAY) && !defined(MPE) && !defined(TPF) -static void sock_disable_nagle(int s) /* ZZZ abstract */ +static void sock_disable_nagle(int s) { /* The Nagle algorithm says that we should delay sending partial * packets in hopes of getting more data. We don't want to do @@ -1086,7 +1086,7 @@ static void child_main(int child_num_arg) } } -static int make_child(server_rec *s, int slot, time_t now) /* ZZZ */ +static int make_child(server_rec *s, int slot, time_t now) { int pid; @@ -1254,7 +1254,6 @@ static void server_main_loop(int remaining_children_to_start) /* we're still doing a 1-for-1 replacement of dead * children with new children */ - /* ZZZ abstract out for AP funcs. */ make_child(server_conf, child_slot, time(NULL)); --remaining_children_to_start; } @@ -1658,7 +1657,6 @@ static const char *set_coredumpdir (cmd_parms *cmd, void *dummy, char *arg) } fname = ap_server_root_relative(cmd->pool, arg); - /* ZZZ change this to the AP func FileInfo*/ if ((stat(fname, &finfo) == -1) || !S_ISDIR(finfo.st_mode)) { return ap_pstrcat(cmd->pool, "CoreDumpDirectory ", fname, " does not exist or is not a directory", NULL); diff --git a/server/mpm/mpmt_beos/mpmt_beos.c b/server/mpm/mpmt_beos/mpmt_beos.c index df323575ed..cf0680eee1 100644 --- a/server/mpm/mpmt_beos/mpmt_beos.c +++ b/server/mpm/mpmt_beos/mpmt_beos.c @@ -872,7 +872,7 @@ static int32 child_main(void * data) return (0); } -static int make_child(server_rec *s, int slot, time_t now) /* ZZZ */ +static int make_child(server_rec *s, int slot, time_t now) { thread_id tid; @@ -1017,7 +1017,6 @@ static void server_main_loop(int remaining_children_to_start) /* we're still doing a 1-for-1 replacement of dead * children with new children */ - /* ZZZ abstract out for AP funcs. */ make_child(server_conf, child_slot, time(NULL)); --remaining_children_to_start; } @@ -1185,7 +1184,7 @@ int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s) "SIGHUP received. Attempting to restart"); } if (!is_graceful) { - ap_restart_time = time(NULL); /* ZZZZZ */ + ap_restart_time = time(NULL); } delete_port(port_of_death); return 0; @@ -1376,7 +1375,6 @@ static const char *set_coredumpdir (cmd_parms *cmd, void *dummy, char *arg) } fname = ap_server_root_relative(cmd->pool, arg); - /* ZZZ change this to the AP func FileInfo*/ if ((stat(fname, &finfo) == -1) || !S_ISDIR(finfo.st_mode)) { return ap_pstrcat(cmd->pool, "CoreDumpDirectory ", fname, " does not exist or is not a directory", NULL); diff --git a/server/mpm/mpmt_pthread/mpmt_pthread.c b/server/mpm/mpmt_pthread/mpmt_pthread.c index b0cea229ba..7b07ef7b95 100644 --- a/server/mpm/mpmt_pthread/mpmt_pthread.c +++ b/server/mpm/mpmt_pthread/mpmt_pthread.c @@ -696,7 +696,7 @@ static int setup_listeners(server_rec *s) */ #if defined(TCP_NODELAY) && !defined(MPE) && !defined(TPF) -static void sock_disable_nagle(int s) /* ZZZ abstract */ +static void sock_disable_nagle(int s) { /* The Nagle algorithm says that we should delay sending partial * packets in hopes of getting more data. We don't want to do @@ -1046,7 +1046,7 @@ static void child_main(int child_num_arg) } } -static int make_child(server_rec *s, int slot, time_t now) /* ZZZ */ +static int make_child(server_rec *s, int slot, time_t now) { int pid; @@ -1220,7 +1220,6 @@ static void perform_idle_server_maintenance(void) idle_spawn_rate = 1; } else { - /* ZZZZ */ if (idle_spawn_rate >= 8) { ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, server_conf, @@ -1273,7 +1272,6 @@ static void server_main_loop(int remaining_children_to_start) /* we're still doing a 1-for-1 replacement of dead * children with new children */ - /* ZZZ abstract out for AP funcs. */ make_child(server_conf, child_slot, time(NULL)); --remaining_children_to_start; } @@ -1487,7 +1485,7 @@ int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s) "SIGHUP received. Attempting to restart"); } if (!is_graceful) { - ap_restart_time = time(NULL); /* ZZZZZ */ + ap_restart_time = time(NULL); } return 0; } @@ -1677,7 +1675,6 @@ static const char *set_coredumpdir (cmd_parms *cmd, void *dummy, char *arg) } fname = ap_server_root_relative(cmd->pool, arg); - /* ZZZ change this to the AP func FileInfo*/ if ((stat(fname, &finfo) == -1) || !S_ISDIR(finfo.st_mode)) { return ap_pstrcat(cmd->pool, "CoreDumpDirectory ", fname, " does not exist or is not a directory", NULL); diff --git a/server/mpm/mpmt_pthread/scoreboard.c b/server/mpm/mpmt_pthread/scoreboard.c index 2f8b34da76..0e208e46bc 100644 --- a/server/mpm/mpmt_pthread/scoreboard.c +++ b/server/mpm/mpmt_pthread/scoreboard.c @@ -642,7 +642,7 @@ void ap_time_process_request(int child_num, int thread_num, int status) ss = &ap_scoreboard_image->servers[child_num][thread_num]; if (status == START_PREQUEST) { - /*ss->start_time = GetCurrentTime(); ZZZ return time in uS since the + /*ss->start_time = GetCurrentTime(); return time in uS since the epoch. Some platforms do not support gettimeofday. Create a routine to get the current time is some useful units. */ if (gettimeofday(&ss->start_time, (struct timezone *) 0) < 0) { @@ -651,7 +651,7 @@ void ap_time_process_request(int child_num, int thread_num, int status) } else if (status == STOP_PREQUEST) { /*ss->stop_time = GetCurrentTime(); - ZZZ return time in uS since the epoch */ + return time in uS since the epoch */ if (gettimeofday(&ss->stop_time, (struct timezone *) 0) < 0) { ss->start_time.tv_sec = ss->start_time.tv_usec = 0L; diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index b4a90d77c9..cb1e829d92 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -2933,7 +2933,6 @@ static const char *set_coredumpdir (cmd_parms *cmd, void *dummy, char *arg) } fname = ap_server_root_relative(cmd->pool, arg); - /* ZZZ change this to the AP func FileInfo*/ if ((stat(fname, &finfo) == -1) || !S_ISDIR(finfo.st_mode)) { return ap_pstrcat(cmd->pool, "CoreDumpDirectory ", fname, " does not exist or is not a directory", NULL); diff --git a/server/mpm/spmt_os2/spmt_os2.c b/server/mpm/spmt_os2/spmt_os2.c index ceb64e5be1..0b19ba7e83 100644 --- a/server/mpm/spmt_os2/spmt_os2.c +++ b/server/mpm/spmt_os2/spmt_os2.c @@ -1737,7 +1737,6 @@ static const char *set_coredumpdir (cmd_parms *cmd, void *dummy, char *arg) } fname = ap_server_root_relative(cmd->pool, arg); - /* ZZZ change this to the AP func FileInfo*/ if ((stat(fname, &finfo) == -1) || !S_ISDIR(finfo.st_mode)) { return ap_pstrcat(cmd->pool, "CoreDumpDirectory ", fname, " does not exist or is not a directory", NULL); diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c index 7a20b066a6..deb9f7d47f 100644 --- a/server/mpm/winnt/mpm_winnt.c +++ b/server/mpm/winnt/mpm_winnt.c @@ -361,7 +361,7 @@ static void AMCSocketCleanup(void) return; } -static void sock_disable_nagle(int s) /* ZZZ abstract */ +static void sock_disable_nagle(int s) { /* The Nagle algorithm says that we should delay sending partial * packets in hopes of getting more data. We don't want to do @@ -1792,7 +1792,6 @@ static const char *set_coredumpdir (cmd_parms *cmd, void *dummy, char *arg) } fname = ap_server_root_relative(cmd->pool, arg); - /* ZZZ change this to the AP func FileInfo*/ if ((stat(fname, &finfo) == -1) || !S_ISDIR(finfo.st_mode)) { return ap_pstrcat(cmd->pool, "CoreDumpDirectory ", fname, " does not exist or is not a directory", NULL); diff --git a/server/util.c b/server/util.c index fc3d2fb40c..379211ef2b 100644 --- a/server/util.c +++ b/server/util.c @@ -103,8 +103,6 @@ API_VAR_EXPORT const char ap_day_snames[7][4] = API_EXPORT(char *) ap_get_time() { - /* ZZZ When we abstract out time, this whole function should change to use - AP funcs. */ time_t t; char *time_string; @@ -136,8 +134,6 @@ API_EXPORT(char *) ap_field_noparam(ap_context_t *p, const char *intype) API_EXPORT(char *) ap_ht_time(ap_context_t *p, time_t t, const char *fmt, int gmt) { - /* ZZZ this function can be replaced by calls to time formatting routines - in APR. */ char ts[MAX_STRING_LEN]; char tf[MAX_STRING_LEN]; struct tm *tms; @@ -190,7 +186,7 @@ API_EXPORT(char *) ap_gm_timestr_822(ap_context_t *p, time_t sec) char *date_str_ptr = date_str; int real_year; - tms = gmtime(&sec); /* ZZZ replace with AP time routine */ + tms = gmtime(&sec); /* Assumption: this is always 3 */ /* i = strlen(ap_day_snames[tms->tm_wday]); */ @@ -1665,7 +1661,6 @@ API_EXPORT(int) ap_is_directory(const char *path) { struct stat finfo; - /* ZZZ replace with AP File Info func. */ if (stat(path, &finfo) == -1) return 0; /* in error condition, just return no */ @@ -1914,7 +1909,6 @@ API_EXPORT(gid_t) ap_gname2id(const char *name) */ unsigned long ap_get_virthost_addr(char *w, unsigned short *ports) { - /* ZZZ Redesign for AP func changes */ struct hostent *hep; unsigned long my_addr; char *p; @@ -1986,7 +1980,6 @@ char *ap_get_local_host(ap_context_t *a) char *server_hostname; struct hostent *p; - /* ZZZ change to use AP funcs. */ #ifdef BEOS if (gethostname(str, sizeof(str) - 1) == 0) #else diff --git a/server/util_md5.c b/server/util_md5.c index f58d222c38..66e1a30bf3 100644 --- a/server/util_md5.c +++ b/server/util_md5.c @@ -198,7 +198,6 @@ API_EXPORT(char *) ap_md5digest(ap_context_t *p, int infile, int convert) int nbytes; ap_MD5Init(&context); - /* ZZZ use AP func instead of fread. */ while ((nbytes = read(infile, buf, sizeof(buf)))) { length += nbytes; if (!convert) { @@ -206,7 +205,6 @@ API_EXPORT(char *) ap_md5digest(ap_context_t *p, int infile, int convert) } ap_MD5Update(&context, buf, nbytes); } - /* ZZZ use AP seek func instead of REWIND. */ lseek(infile, 0L, SEEK_SET); return ap_md5contextTo64(p, &context); } @@ -221,12 +219,10 @@ API_EXPORT(char *) ap_md5digest(ap_context_t *p, int infile) int nbytes; ap_MD5Init(&context); - /* ZZZ use AP func instead of fread. */ while ((nbytes = read(infile, buf, sizeof(buf)))) { length += nbytes; ap_MD5Update(&context, buf, nbytes); } - /* ZZZ use AP seek func instead of REWIND. */ lseek(infile, 0L, SEEK_SET); return ap_md5contextTo64(p, &context); } diff --git a/server/util_script.c b/server/util_script.c index 043a61ae23..b38216e6ff 100644 --- a/server/util_script.c +++ b/server/util_script.c @@ -682,9 +682,6 @@ static char **create_argv_cmd(ap_context_t *p, char *av0, const char *args, char } #endif -/* ZZZ need to look at this in more depth and convert to an AP func so we - can get rid of OS specific code. - */ #if 0 API_EXPORT(int) ap_call_exec(request_rec *r, ap_child_info_t *pinfo, char *argv0, char **env, int shellcmd) diff --git a/server/vhost.c b/server/vhost.c index 31f777e654..e46d1305c2 100644 --- a/server/vhost.c +++ b/server/vhost.c @@ -167,9 +167,6 @@ void ap_init_vhost_config(ap_context_t *p) static const char *get_addresses(ap_context_t *p, char *w, server_addr_rec ***paddr, unsigned port) { - /* ZZZ redesign to use AP funcs and types. Will see what I can do to make it - similar using posix std's. */ - struct hostent *hep; unsigned long my_addr; server_addr_rec *sar; @@ -424,7 +421,6 @@ static void dump_vhost_config(APRFile fd) fprintf(f, "VirtualHost configuration:\n"); for (i = 0; i < IPHASH_TABLE_SIZE; ++i) { for (ic = iphash_table[i]; ic; ic = ic->next) { - /* ZZZ should we change the Net addr to a string for this? */ if (ic->sar->host_port == 0) { ap_snprintf(buf, sizeof(buf), "%pA:*", &ic->sar->host_addr); } @@ -475,8 +471,6 @@ static void dump_vhost_config(APRFile fd) /* compile the tables and such we need to do the run-time vhost lookups */ void ap_fini_vhost_config(ap_context_t *p, server_rec *main_s) { - /* ZZZ need to redesign for use with AP funcs. will look into this later. - */ server_addr_rec *sar; int has_default_vhost_addr; server_rec *s; @@ -781,7 +775,6 @@ static void check_hostalias(request_rec *r) * names we'll match have ports associated with them */ const char *host = r->hostname; - /* ZZZ use AP func here. */ unsigned port = ntohs(r->connection->local_addr.sin_port); server_rec *s; server_rec *last_s;