From: Jeff Trawick Date: Thu, 7 Apr 2011 00:03:09 +0000 (+0000) Subject: axe ap_registry_get_server_root(), which seems to have been unused X-Git-Tag: 2.3.12~89 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09999dd93b5547084033f86e88534fb093376028;p=thirdparty%2Fapache%2Fhttpd.git axe ap_registry_get_server_root(), which seems to have been unused after httpd 1.3 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1089688 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/winnt/service.c b/server/mpm/winnt/service.c index e8311bf22b5..5a246c445dc 100644 --- a/server/mpm/winnt/service.c +++ b/server/mpm/winnt/service.c @@ -57,43 +57,6 @@ static nt_service_ctx_t globdat; static int ReportStatusToSCMgr(int currentState, int waitHint, nt_service_ctx_t *ctx); - -#define PRODREGKEY "SOFTWARE\\" AP_SERVER_BASEVENDOR "\\" \ - AP_SERVER_BASEPRODUCT "\\" AP_SERVER_BASEREVISION - -/* - * Get the server root from the registry into 'dir' which is - * size bytes long. Returns 0 if the server root was found - * or if the serverroot key does not exist (in which case - * dir will contain an empty string), or -1 if there was - * an error getting the key. - */ -apr_status_t ap_registry_get_server_root(apr_pool_t *p, char **buf) -{ - apr_status_t rv; - ap_regkey_t *key; - - if ((rv = ap_regkey_open(&key, AP_REGKEY_LOCAL_MACHINE, PRODREGKEY, - APR_READ, p)) == APR_SUCCESS) { - rv = ap_regkey_value_get(buf, key, "ServerRoot", p); - ap_regkey_close(key); - if (rv == APR_SUCCESS) - return rv; - } - - if ((rv = ap_regkey_open(&key, AP_REGKEY_CURRENT_USER, PRODREGKEY, - APR_READ, p)) == APR_SUCCESS) { - rv = ap_regkey_value_get(buf, key, "ServerRoot", p); - ap_regkey_close(key); - if (rv == APR_SUCCESS) - return rv; - } - - *buf = NULL; - return rv; -} - - /* exit() for Win32 is macro mapped (horrible, we agree) that allows us * to catch the non-zero conditions and inform the console process that * the application died, and hang on to the console a bit longer.