lpfnGetAcceptExSockaddrs(buf, 0, PADDED_ADDR_SIZE, PADDED_ADDR_SIZE,
&context->sa_server, &context->sa_server_len,
&context->sa_client, &context->sa_client_len);
-
- context->overlapped.Pointer = NULL;
}
else /* (accf = 0) e.g. 'none' */
{
* os_sock_make and os_sock_put that it does not query).
*/
WSAEventSelect(context->accept_socket, 0, 0);
- context->overlapped.Pointer = NULL;
err_count = 0;
context->sa_server_len = sizeof(context->buff) / 2;
return context;
}
-apr_status_t winnt_insert_network_bucket(conn_rec *c,
- apr_bucket_brigade *bb,
- apr_socket_t *socket)
-{
- apr_bucket *e;
- winnt_conn_ctx_t *context = ap_get_module_config(c->conn_config,
- &mpm_winnt_module);
- if (context == NULL || (e = context->overlapped.Pointer) == NULL)
- return AP_DECLINED;
-
- /* seed the brigade with AcceptEx read heap bucket */
- APR_BRIGADE_INSERT_HEAD(bb, e);
- /* also seed the brigade with the client socket. */
- e = apr_bucket_socket_create(socket, c->bucket_alloc);
- APR_BRIGADE_INSERT_TAIL(bb, e);
- return APR_SUCCESS;
-}
-
/*
* worker_main()
* Main entry point for the worker threads. Worker threads block in
winnt_conn_ctx_t *context = NULL;
int thread_num = (int)thread_num_val;
ap_sb_handle_t *sbh;
- apr_bucket *e;
int rc;
conn_rec *c;
apr_int32_t disconnected;
}
}
- e = context->overlapped.Pointer;
-
ap_create_sb_handle(&sbh, context->ptrans, 0, thread_num);
c = ap_run_create_connection(context->ptrans, ap_server_conf,
context->sock, thread_num, sbh,
if (!c) {
/* ap_run_create_connection closes the socket on failure */
context->accept_socket = INVALID_SOCKET;
- if (e) {
- apr_bucket_free(e);
- }
continue;
}
c->aborted = 1;
}
- if (e && c->aborted) {
- apr_bucket_free(e);
- }
- else {
- ap_set_module_config(c->conn_config, &mpm_winnt_module, context);
- }
-
if (!c->aborted) {
ap_run_process_connection(c);
}
ap_hook_mpm(winnt_run, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_mpm_query(winnt_query, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_mpm_get_name(winnt_get_name, NULL, NULL, APR_HOOK_MIDDLE);
- ap_hook_insert_network_bucket(winnt_insert_network_bucket, NULL, NULL,
- APR_HOOK_MIDDLE);
}
AP_DECLARE_MODULE(mpm_winnt) = {