Move procmgr_init_spawn_cmd() out of a loop
Remove an unnecessary memset() call in procmgr_init_spawn_cmd()
git-svn-id: https://svn.apache.org/repos/asf/httpd/mod_fcgid/trunk@1378181 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/modules/fcgid/fcgid_bridge.c b/modules/fcgid/fcgid_bridge.c
index f0d9543..7cde158 100644
--- a/modules/fcgid/fcgid_bridge.c
+++ b/modules/fcgid/fcgid_bridge.c
@@ -429,14 +429,12 @@
bucket_ctx->ipc.request = r;
apr_pool_cleanup_register(r->pool, bucket_ctx,
bucket_ctx_cleanup, apr_pool_cleanup_null);
+ procmgr_init_spawn_cmd(&fcgi_request, r, cmd_conf);
/* Try to get a connected ipc handle */
for (i = 0; i < FCGID_REQUEST_COUNT; i++) {
/* Apply a free process slot, send a spawn request if I can't get one */
for (j = 0; j < FCGID_APPLY_TRY_COUNT; j++) {
- /* Init spawn request */
- procmgr_init_spawn_cmd(&fcgi_request, r, cmd_conf);
-
bucket_ctx->ipc.connect_timeout =
fcgi_request.cmdopts.ipc_connect_timeout;
bucket_ctx->ipc.communation_timeout =
diff --git a/modules/fcgid/fcgid_pm_unix.c b/modules/fcgid/fcgid_pm_unix.c
index ed5fa97..18906b5 100644
--- a/modules/fcgid/fcgid_pm_unix.c
+++ b/modules/fcgid/fcgid_pm_unix.c
@@ -427,8 +427,6 @@
fcgid_server_conf *sconf =
ap_get_module_config(r->server->module_config, &fcgid_module);
- memset(command, 0, sizeof(*command));
-
/* suEXEC check */
if ((ugid = ap_run_get_suexec_identity(r))) {
command->uid = ugid->uid;
diff --git a/modules/fcgid/fcgid_pm_win.c b/modules/fcgid/fcgid_pm_win.c
index f6cff87..35a2b41 100644
--- a/modules/fcgid/fcgid_pm_win.c
+++ b/modules/fcgid/fcgid_pm_win.c
@@ -136,8 +136,6 @@
fcgid_server_conf *sconf =
ap_get_module_config(r->server->module_config, &fcgid_module);
- memset(command, 0, sizeof(*command));
-
/* no truncation should ever occur */
AP_DEBUG_ASSERT(sizeof command->cgipath > strlen(cmd_conf->cgipath));
apr_cpystrn(command->cgipath, cmd_conf->cgipath, sizeof command->cgipath);